Re:Git your act together
by kyleslattery on Monday August 23, 2010 @05:06PM
(#1628064)
Even better is to use `git commit -v`--it'll have a complete diff that you can review while writing your commit message
I commit pretty frequently, so unless I'm merging in a large feature I tend to use git -m more often.
That doesn't mean that I don't rebase a bunch of those smaller changes away before pushing them upstream it just means a lot of the changes I commit are small enough that it's easier not to load Vim to write a commit message.
Occasionally I'm using a terminal which can't open an editor for one reason or another. In those situations I use -m.
Re:Git your act together
by koenigdavidmj on Monday August 23, 2010 @04:14PM
(#1627903)
If you need more than one line, you can say
git commit -F -
to specify that the commit message should be read from standard input.
First of all, it allows you to easily write extended commit messages (just leave the second line blank and start writing the extended message on the third line). A good idea would be to leave (#more) anchor at the end of the first line, so that others would know there's actually some more info they might want to read.
Then you can always see the files currently being committed while you're in the editor, that's convenient. Last but not least - it helps me take my commit messages seriously.