Git Update Commit Message
One of my faults as a professional developer is that my commit messages aren't always as descriptive as they could be. Sometimes I even notice a spelling error in them. Bleh -- that's not cool, man. When I do catch that my last commit message isn't good enough, I find the following git command useful:
The command below rewrites the message for the previous commit. You can omit the -m
and message to go into the commit shell instead.
git commit --amend -m "This is the new message"
Do realize, however, that performing this after you've pushed to a remote repo is considered bad as it rewrites history. If you haven't pushed, however, the command above is gold!
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
One of my favorite social APIs was the Open Graph API adopted by Facebook. Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...
We all know about the big font replacement methods. sIFR's big. Image font replacement has gained some steam. Not too many people know about a great project named Cufón though. Cufón uses a unique blend of a proprietary font generator tool...
Last week we created a very simple MooTools slideshow script. The script was very primitive: no events and no next/previous controls -- just cross-fading between images. This tutorial will take the previous slideshow script a step further by:
Adding "Next" and "Previous" controls.
Adding...
This is one of the things I do more frequently :-/
The good thing is that, with amend, you can also include in the commit new changes (provided that you have added them to the staging area).
The drawback is that it’s **bad** to amend a commit that has already been pushed to a remote repository.
May I point you to an article of my own, in which I describe some more solutions on how to change commit messages:
http://www.gamez.name/change-commit-message-git/
Be careful, this command rewrites history and shouldn’t be used if you already pushed your last commit.
And you are noticing it now? :D
One thing to remember is HASH is changed on amending.
And you are noticing it now? :D
Well, one thing to notice is that HASH of that particular commit is rewritten when amending.