Git rebase around a merge
If, for example you wanted to achieve the following with your git commits
commit <- want to reword this one
merge
commit <- want to squash this one and the next one into one commit
commit
You can rebase as normal but use the --preserve-merges
flag to allow you to move around the merge.
git rebase -i HEAD~4 --preserve-merges
Written by Andrew Walker
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#