Re: commit --amend neglecting return value
- From
Brian Gernhardt <brian@gernhardtsoftware.com>
- Date
- Mar 22, 2010, 05:20 UTC
- Message-ID
- <E139EF92-B047-4928-A390-D47224CAA3DB@gernhardtsoftware.com>
- In-Reply-To
- <196847A3-42CB-4CE8-8FFC-D7C8C8AFCDF7@gernhardtsoftware.com>
On Mar 22, 2010, at 1:16 AM, Brian Gernhardt wrote:
> If you want to abort committing while editing the message, delete the entire message (in Vim: "0dG:wq^M") and git will reply "Aborting commit due to empty commit message."
Oops. Obviously I meant "ggdG:wq^M".
Also, a quick search of :help and testing reveals that ":cq" causes Vim to exit with non-zero status which will cause git to abort the commit.
~~ Brian