|
|
|
|
|
by westurner
1772 days ago
|
|
`git pull --rebase` usually is what I need to do. To save local changes and rebase to the git remote's branch: # git branch -av;
# git remote -v;
# git reflog; git help reflog; man git-reflog
# git show HEAD@{0}
# git log -n5 --graph;
git add -A; git status;
git stash; git stash list;
git pull --rebase;
#git pull --rebase origin develop
# git fetch origin develop
# git rebase origin/develop
git stash pop;
git stash list;
git status;
# git commit
# git rebase -i HEAD~5 # squash
# git push
HubFlow does branch merging correctly because I never can. Even when it's just me and I don't remember how I was handling tags of releases on which branch, I just reach for HubFlow now and it's pretty much good.There's a way to default to --rebase for pulls: is there a reason not to set that in a global gitconfig?
Edit: From https://stackoverflow.com/questions/13846300/how-to-make-git... : > There are now 3 different levels of configuration for default pull behaviour. From most general to most fine grained they are: […] git config --global pull.rebase true
|
|