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?

1

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.

5

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest