(ds)

by dean@strelau.net

twitter.com/dstrelau:

    `git pull —rebase` by default

    It took me a while to track this down (since it’s not in the docs for git-pull), so I’ll throw it out there for the G to pick up.

    If you want git pull to add in --rebase every time, you can set the branch.autosetuprebase configuration option. From the docs (for git-config):

    When a new branch is created with git-branch or git-checkout that tracks another branch, this variable tells git to set up pull to rebase instead of merge (see “branch..rebase”). When never, rebase is never automatically set to true. When local, rebase is set to true for tracked branches of other local branches. When remote, rebase is set to true for tracked branches of remote branches. When always, rebase will be set to true for all tracking branches. See “branch.autosetupmerge” for details on how to set up a branch to track another branch. This option defaults to never.

    To set:

    
    git config branch.autosetuprebase always
    

    Of course, you can override this with --no-rebase.

    — 1 year ago with 3 notes
    #git 
    1. dstrelau posted this