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.
Written by Thomas Riboulet
Related protips
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#