4

Currently, my global settings are set to do a rebase during a git pull. I want it to change it to git merge by default. How do I change this setting?

Manik Malhotra
  • 614
  • 6
  • 10

1 Answers1

9

TL;DR

git config --global pull.rebase false

A bit detail

Git uses the configuration pull.rebase for this.

If you want to disable rebasing on pull, it can be set to false:

git config pull.rebase false

In order to do this globally, use

git config --global pull.rebase false

With this, git should do this for all repositories, unless configured otherwise.

If there is a local configuration, this will be overwritten.

Also, the pull.rebase option is overwritten by the --rebase option (git pull --rebase).

If you want to configure it for all users on your computer, you can execute

git config --system pull.rebase false

with administrative privileges.

This sets the default pull.rebase option for your system but it can be overwritten with --rebase, the local and global configuration.

dan1st
  • 12,568
  • 8
  • 34
  • 67