Gitting the commit message right
It’s not uncommon for a developer to discover that a certain commit message is off the mark and needs revision. Like with most things in Git, this can be achieved in more than one way. Using `git commit –amend` The command fires up a message editor with the previous commit’s message as the starting point, instead of an empty one. With the –amend option, the new commit replaces the tip of the current branch. Care should be taken, since all staged contents will be committed after running this command. If a simple message edit is all one has in mind, the index should be empty. However, the working directory might have changes and they will not be affected. # fires up message editor git commit –amend # pass message on command line git commit –amend -m “New Message” Using git rebase If the commit to be fixed is not the…