-
[GIT] 원격 저장소에 push가 안 될 때 (Updates were rejected because the remote contains work that you do / Updates were rejected because the tip of your current branch is behind)
2022. 3. 10.
2021.5.10 작성

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.git 원격저장소 repo에 push하려고 할 때 이런 오류가 뜬다
로컬에 없는게 원격이 포함되어있다고... 이건 리드미 파일 때문이다 (README.md)
원격저장소 생성할 때 리드미 파일을 생성했기 때문.따라서 git pull로 먼저 받아와야 한다

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.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.이 오류도 마찬가지로 README파일 때문에 pull 먼저 받아와야 에러가 나지 않는다
참고로 여기서 또
commit -> pull -> push : 에러남
pull -> commit -> push : 성공!
이렇게 갈린다
GIT 쓸 때 순서도 참 중요하구나 다시 한 번 느낌
파일 꼬이는거 한순간이다...
'Programming > 에러노트' 카테고리의 다른 글
댓글
