Git always rebase on git pull
git config --global branch.autosetuprebase always
Written by Max Gonzih
Related protips
2 Responses
It's also good to set up git config --global git-up.rebase.arguments --preserve-merges. Please read my comment.
over 1 year ago
·
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#