git pull 하려는데.. (브랜치 분기 이슈)

Henrique·2024년 3월 14일

Git 짧막 지식

목록 보기
5/32

 git pull
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
이렇게 뜬다

https://devum.tistory.com/77

https://velog.io/@eunddodi/git-pull-%EC%8B%9C-%EB%B0%9C%EC%83%9D%ED%95%98%EB%8A%94-warning-%ED%95%B4%EA%B2%B0%ED%95%98%EA%B8%B0Need-to-specify-how-to-reconcile-divergent-branches

두가지 시도하니까 이렇게 뜬다


해결


위에 git fetch origin main 치고
git merge origin/main 치니까

이렇게 incming이랑 current 보여주면서 뭐가 다른지 보여주고
Result에서 알아서 병합한 결과 코드 보여주고 괜찮으면 merge 할거냐고 물어봐서 merge함

0개의 댓글