로컬 저장소와 깃허브 repo 연결하기

문파이더맨·2021년 5월 24일
0

Question mark

목록 보기
2/5
post-thumbnail

🧑‍💻 새로운 repo에 로컬 저장소와 연결하기

  • 먼저 로컬 저장소에 initialize 해준다.
git init
  • git에 올려주는 작업을 한다.
git add .
git commit -m "msg"
  • 만들어둔 repo를 끌어와 연동시킨다.
git remote add origin <원격저장소 주소.git>
  • pull로 github의 repo를 끌어와준다.
git pull --allow-unrelated-histories origin master
  • 마지막으로 push 작업을 -u 옵션으로 해준다.
git push -u origin master

중간에 오류가 발생하거나 틀린 부분이 있다면 댓글 부탁드립니다. 🙋‍♂️

profile
Sever 개발할래요.

0개의 댓글