git: How to always pull with rebase

Updated . Posted . Visible to the public.

In order to have more human readable git branches, do

  git pull --rebase

To always pull like this, write these lines to your ~/.gitconfig:

[pull]
   rebase = true

..or use this oneliner

git config --global pull.rebase true

Note that this will break if you pull from other upstream branches like

git pull origin other-branch

If you keep rebasing by default, you can get "merge pulls" like this:

git pull --no-rebase origin other-branch
Profile picture of Martin Straub
Martin Straub
Last edit
Michael Leimstädtner
License
Source code in this card is licensed under the MIT License.
Posted by Martin Straub to makandra dev (2013-06-13 07:44)