[GIT] entirely different commit histories

이수형·2022년 9월 6일
0

https://kim6394.tistory.com/254

"There isn't anything to compare. Nothing to compare, branches are entirely different commit histories"

master로 push를 하면 커밋 결과가 제대로 적용되지 않고, main 브랜치와 Compare하는 창이 나온다.

기본 default 브랜치가 main이기 때문에, master로 push를 해도 아직 적용 단계가 안되었기 때문이다.

현재 많은 튜토리얼 들이 master 브랜치가 default인 기준으로 작성되어서 제대로 push가 되지 않는 상황이 많다.

만약 강제로 주입해도 되는 상황이라면, git bash에서 아래와 같이 진행해서 해결할 수 있다.

git checkout master
git branch main master -f
git checkout main
git push origin main -f
profile
후회없는 오늘이, 후회없는 내일

0개의 댓글