How to Disable Git Pull. Rebase (Rebasing by Default Upon Pull)
I Tried Setting Git Config --Global Pull. Rebase False and Git Config Pull. Rebase False and When I Run Git Config --Global Pull. Rebase or Git Config Pull...
I tried setting
git config --global pull.rebase false
and
git config pull.rebase false
and when I run
git config --global pull.rebase
or
git config pull.rebase
I see false, but when I run git pull ... it still is doing a rebase. How can I make this go away again?
2 Answers
The best way
Don't use git pull. Just run git fetch and then when it's done, run git merge.
(This is also the best way to do rebase pulls: don't use git pull. "This ... is wrong tool. Never use this.")
The other way
Use git pull --rebase=false. The command line flag overrides the configuration setting.
In addition to pull.rebase, this behavior can also be enabled using branch.<name>.rebase or branch.autoSetupRebase. To disable rebasing by default on git pull, you need to unset those on all levels of Git configuration (repo, user, system).