[GIT] fatal: Need to specify how to reconcile divergent branches.

  • huaya
    (후아빠)
  • huaya's Avatar 이 글의 작성자
  • Offline
  • Junior
  • Junior
더보기
21 Jul 2022 11:14 #31921 작성자: huaya
huaya 님의 글: [GIT] fatal: Need to specify how to reconcile divergent branches.
* branch            main       -> FETCH_HEAD
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 (the default strategy)
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.

해결 방법 1: Merge Strategy
로컬 브랜치에 없는 원격 변경 사항이 있는 경우 해결해야 합니다. 기본 Git 동작은 병합이며 이러한 변경 사항을 해결하는 새 커밋을 로컬 분기에 생성합니다. rebase 전략을 사용하는 대신 git config pull.rebase false 명령을 사용하여 기본 병합 전략으로 다시 전환 할 수 있습니다 .

해결 방법 2: fast-forward Strategy
때로는 기본 전략이 FF 전용일 수 있습니다. 따라서 이 전략으로 다시 전환하려면 git config --global pull.ff only 명령을 실행해야 합니다.
Time to create page: 0.053 seconds
Powered by Kunena Forum