162 words
1 minute
[Git]원격저장소 추가하기
2024-05-25
2026-01-09

Overview#

  • git 원격저장소 추가하기 정리
  • 엄청 자주 하는 작업이지만 매번 찾아보면서 작업했기 때문에 이 참에 간단하게 정리한다.

01. 절차#

  • git 저장소 만들기
Terminal window
git init
  • 원격저장소 만들기(github)

README, .gitignore 파일 만들지 말것. 원격저장소랑 로컬 저장소랑 충돌남

  • 로컬 저장소와 원격 저장소 연결
Terminal window
git remote add origin <원격저장소주소>
  • 로컬 수정사항 반영하기
Terminal window
# 로컬 수정사항 반영
git add .
# commit
git commit -m "feat: first commit"
#commit 이력으로 remote repository에 업로드
git push -u origin main
[Git]원격저장소 추가하기
https://yjinheon.netlify.app/posts/02de/git/git-ssh_remote_add/
Author
Datamind
Published at
2024-05-25
License
CC BY-NC-SA 4.0