Git Rebasing Setup git-pull for automatically perform a rebase instead of a merge


If your team is following a rebase-based workflow, it may be a advantageous to setup git so that each newly created branch will perform a rebase operation, instead of a merge operation, during a git pull.

To setup every new branch to automatically rebase, add the following to your .gitconfig or .git/config:

autosetuprebase = always

Command line: git config [--global] branch.autosetuprebase always

Alternatively, you can setup the git pull command to always behave as if the option --rebase was passed:

rebase = true

Command line: git config [--global] pull.rebase true