b_ir8a
Last Updated: February 25, 2016
·
1.139K
· gonzih
9180509c34ff37b67fa86f0b7cd62ed0

Git always rebase on git pull

git
git config --global branch.autosetuprebase always
Say Thanks
Respond

2 Responses
Add your response

2852
Photo on 08.01.2013 at 04.15

It's also good to set up git config --global git-up.rebase.arguments --preserve-merges. Please read my comment.

over 1 year ago ·
2874
9180509c34ff37b67fa86f0b7cd62ed0

Thanks for advice @sheerun, but I think that provided scenarion:

You check out master branch
You do your feature on feature branch while origin/master also changes on remote side
You merge your feature branch to your local master, without calling git-up before 
You run git-up what results in rebasing master on origin/master and you loose your merge history: 

is just really bad habbit. You need to rebase your feature branch on top of origin/master first, and after that merge it in to the local master branch. It's just obvious for me.

over 1 year ago ·