git push 에러 해결

itisny·2023년 3월 31일
0

git push를 하는데 에러가 발생한다면...

error: failed to push some refs to 'git@github.com:abc/aaa.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.

중앙 저장소의 최신 커밋 이력을 로컬로 받아온 후, 자신의 로컬 커밋 이력과 통합하고 다시 푸시해야 한다. (git pull 또는 git fetch 이용)

  • fetch : 최신 커밋 내역을 가져온다. merge는 하지 않는다.
  • pull : 최신 커밋 내역을 가져오고, 로컬 저장소(내 저장소)에 merge 까지 자동으로 해 준다.

0개의 댓글