Open1
GitHub の fatal: Need to specify how to reconcile divergent branches エラーの解決方法
fatal: Need to specify how to reconcile divergent branches エラーの解決方法
エラー内容
git pull origin master
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 26 (delta 10), reused 23 (delta 9), pack-reused 0
Unpacking objects: 100% (26/26), 789.64 KiB | 1.02 MiB/s, done.
From github.com:yukimura-manase/giftech2024s-team-e
* branch master -> FETCH_HEAD
74463b3..e206af1 master -> origin/master
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.
hint にある通り、3つのどれかを設定すれば、上記Errorは発生しなくなる
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
- Merge
- Rebase
- Fast-Foward Only
Merge 設定を選択
git config pull.rebase false
再度、git pull origin master で pullができることを確認しました🌟
参考・引用