본문 바로가기
Programming/Git

[Git] fatal: Need to specify how to reconcile divergent branches

by goatlab 2022. 8. 26.
728x90
반응형
SMALL

fatal: Need to specify how to reconcile divergent branches

 

 

Git 시스템에서 작업하는 경우 원격 리포지토리에서 git pull을 수행하려고 시도하는 동안 이 오류가 발생하는 것은 매우 드문 일이 아니다. 대부분의 경우 "fatal: Need to specify how to reconcile divergent branches"경고로 표시되지만 때로는 치명적인 오류로 표시된다. 오류가 경고로 표시되면 여전히 repo에서 변경 사항을 가져올 수 있지만 치명적인 오류로 표시되면 더 이상 진행할 수 없다.

 

$ 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.

 

로컬 branch에 없는 원격 변경 사항이 있는 경우 해결해야 한다. 기본 Git 동작은 병합이며 이러한 변경 사항을 해결하는 새 커밋을 로컬 branch에 생성한다.

 

git pull --no-rebase
git pull --rebase
git pull --ff-only

 

https://www.cyberithub.com/solved-fatal-need-to-specify-how-to-reconcile-divergent-branches/

 

Solved "fatal: Need to specify how to reconcile divergent branches" | CyberITHub

In this article, we will look into how to solve "fatal: Need to specify how to reconcile divergent branches" error. Last night while working on my project, I

www.cyberithub.com

 

728x90
반응형
LIST