git-commit.el assumes that the
emacsclient is used as
$GIT_EDITOR. When that is the case then aborting does still save the changes to
emacsclient then exits with a non-zero exit status, which instructs
git commit to not create the commit.
It would probably be possible to make this work with
emacs too, but I am not sure whether that would be worth the increased complexity. It's always preferable to use the
emacsclient, most importantly this avoids an unnecessary startup delay.
So my recommendation is that you learn how to setup the emacs server and how to connect to it using
Or even to give Magit a try. In Magit a commit is initiated simply by pressing
NOTE 1: Op also opened a related issue here, let's discuss there whether a future version of
git-commit should also support using plain old
emacs as editor.
NOTE 2: When OP asked the question
magit v2.1.0 was not released yet. Now, after the release,
git-commit-mode.el has been renamed to
git-commit.el and the command that performs the commit is named
with-editor-finish (the key binding is still the same : C-c C-c.