2019. 11. 29 글 옮김

push가 안먹힘 이유는
로컬 저장소 -> 원격저장소로 반영하려고 했을 때 원격저장소가 내 로컬저장소보다 이전버전이 아니라고 함
(push 할때는 내 로컬 저장소가 최신버전이여야 하는구나..)
원격저장소를 생성했을 때 README.md 파일이 생성된 커밋이 내 로컬 저장소 커밋 로그에 없어서 그렇다고 함
원격저장소를 땡겨와서 로컬 저장소로 받아오자
pull을 해준다(원격저장소 가져와서 fetch + 복사 merge)

commit이 없다고(unrelated histories) merge 거부됨. 공통되는 옵션썼는데도 안먹힘..
.git 삭제하고 처음부터 다시

이번에도 거부함

파일이름은 같은데 내용이 달라서 충돌되는 거였음
VSC 켜서 README.md 파일을 GitHub 레파지토리 README.md랑 같게 내용을 수정해줌 또는 반대로

수정한거 commit 하고 log 찍어 봄

'Git, GitHub' 카테고리의 다른 글
Mac에서 git branch했을 때 출력창이 길어지는 문제 (0) | 2023.05.23 |
---|---|
[Git Bash] git remote add error (fatal: protocol 'https' is not supported) (0) | 2022.01.11 |
[Git Bash] error: Pulling is not possible because you have unmerged files. (0) | 2020.08.21 |