Using git rebase to merge commits
Last week I needed to merge 4 commits and used ** git rebase **
This is an absolutely terrible thing to do if you are collaborating with others.
git rebase -i HEAD~4
This will open up your default text editor where you can 'pick' which commits to keep and which to squash.
Save the file and off you go. Make sure you
git push -f origin master
if all is lost then you can always run
git rebase --abort
Written by Will
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rebase
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#