Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no keybinding to finish magit commit #2196

Closed
tko opened this issue Jul 3, 2015 · 18 comments
Closed

no keybinding to finish magit commit #2196

tko opened this issue Jul 3, 2015 · 18 comments

Comments

@tko
Copy link
Contributor

tko commented Jul 3, 2015

in vim style

  1. bring up magit SPC g s
  2. stage some changes s
  3. commit c c
  4. write commit message
  5. ???

COMMIT_EDITMSG is in Text mode and there are no obvious keybindings to finish the commit. , says No previous search and SPC m says SPC m is undefined

@justbur
Copy link
Contributor

justbur commented Jul 3, 2015

C-c C-c to commit and C-c C-k to abort both work for me. I'm not sure if there are other bindings for these.

@kritzcreek
Copy link
Contributor

Before 0.103 there was , c c

@tko
Copy link
Contributor Author

tko commented Jul 3, 2015

Hmm, so commit and abort are in with-editor-mode(-map) and bunch of commit helpers (adding Acked-by and other git conventions) are in git-commit-mode(-map) -- they're both minor modes which I guess leads to all major mode leader keys being left unmapped :-/

@mightybyte
Copy link
Contributor

I have this problem too. The docs say to use SPC m c c, but as this issue says, SPC m is undefined.

@velppa
Copy link

velppa commented Sep 12, 2015

Same thing for me. Using C-c C-C but that's not obvious at all.

@TheBB
Copy link
Collaborator

TheBB commented Sep 12, 2015

The echo area does say "When done with a buffer, type C-c C-c". The git layer documentation (in develop at least) also says this.

Unfortunately there's no easy way to make a leader key binding just for this buffer any more.

@justbur
Copy link
Contributor

justbur commented Oct 28, 2015

@TheBB I think you should close this

@tasmo
Copy link

tasmo commented Sep 5, 2016

This is not a keybinding what I expect from SPACEmacs.

@kritzcreek
Copy link
Contributor

tasmo , c works. Just escape to normal Mode and hit , c

@tasmo
Copy link

tasmo commented Sep 5, 2016

@kritzcreek Wow, that works. Thank you!

@deb0ch
Copy link
Contributor

deb0ch commented Sep 5, 2016

I usually use SPC b d, just closing the buffer works like a charm because it is the way it works in command-line git

@tasmo
Copy link

tasmo commented Sep 5, 2016

@deb0ch SPC f s followed by SPC b k didn't work for me. It just does when I call git commit from the command line but not with magit.

@deb0ch
Copy link
Contributor

deb0ch commented Sep 5, 2016

@tasmo I was talking of SPC b d with a 'd', but maybe you made a typo ?

I'm talking of doing that after editing the commit message when in the COMMIT_EDITMSG buffer-file, opened when pressing c in the *magit-commit-popup* buffer.

@tasmo
Copy link

tasmo commented Sep 5, 2016

@deb0ch Thank you. It was not a typo. Strange is that SPC b k is killing the buffer and it won't work but with SPC b d. Don't see the logic behind.

@dhanjit
Copy link

dhanjit commented Oct 18, 2017

C-c C-c doesn't work as it does write the commit message however when I do git status from terminal it still says staged but not comited.

@robbert-vdh
Copy link
Contributor

I just close the buffer with ZZ (evil-mode), just like you'd do in command line git.

@HaoZeke
Copy link

HaoZeke commented Apr 28, 2018

I think the canonical binding is , , or , c which seem semantic and are still working as of the develop branch. (0.300)

@kreimben
Copy link

Save commit messages, press ,.
It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests