Last Updated: February 25, 2016
·
874
· mcansky

Changing history p2

git rebase -i also gives a lot of power to reword commit messages and edit commits.

reword

This one allows you to simply edit the commit message of a commit, this is very handy to remove little typing mistakes or improve the commit message.

This one is probably as useful as fixup and squash.

edit

Actually editing a commit use the git amend method : it allows you to roll back the code to the point before doing the commit. You can just tweak the code to your liking and just call git commit to see the old commit message as initial message allowing you to add something about what you just did.

Once done, git will replay all later commits (you might end up with some conflicts) leaving you with the "improved" tree.