git

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

I see false, but when I run git pull ... it still is doing a rebase. How can I make this go away again?


Solution

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