Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".
- From
Andy Whitcroft <apw@shadowen.org>
- Date
- Nov 30, 2006, 17:13 UTC
- Message-ID
- <456F1148.2020907@shadowen.org>
- In-Reply-To
- <ekmkoe$a52$1@sea.gmane.org>
Salikh Zakirov wrote:
Show 20 quoted lines
> Junio C Hamano wrote: >> I've been playing with a "private edition" git to see how it >> feels like to use "git commit" that defaults to the "-a" >> behaviour, using myself as a guinea pig, for the rest of the >> evening. > > Thanks a lot for the patches, Junio! > > I am using them for two days, and my experience is great! > Many times it saved me annoyances of forgetting to put '-a' to 'git commit'. > > It should be noted, that I mostly used 'git-commit files...' > or 'git-commit -a' forms before. > > Someone said, that default '-a' does not go well with 'git-commit --amend', > and I second that. It was somewhat suprising to see that 'git commit --amend' > is going to include all of the dirty state into the commit, > and since there is no easy way to abort a --amend commit (because the comment > buffer wasn't empty, and :q! does not work as it would on the regular commit), > I had to untwine the changes manually.
If you have no commit message the commit will be aborted. So just write back a completly empty commit message. "dG:wq" in vi land.
apw@larry:~/git/linux-2.6$ git commit --amend * no commit message? aborting commit. apw@larry:~/git/linux-2.6$