How can I use keyboard shortcuts to do a git commit and push from IntelliJ IDEA?
Asked Answered
G

3

17

I'm aware that Cmd+K (on macOS) will bring up the Git commit dialog, but I can't figure out how to do a commit and then a push without switching to my mouse.

Can anyone provide any guidance here?

Gangue answered 2/10, 2013 at 16:36 Comment(2)
For me (windows) I can use Ctrl+K, type commit message, Alt+P, enter, and then enter to push. Alt+P is to access the "Commit and Push" option of the commit changes dialog. Perhaps try that?Weymouth
Ah, I thought I had experimented with "Alt" to trigger those keys, but I guess not. Thank you!Gangue
B
14

On Windows, Alt+P acts as an accelerator for the "Commit and Push" commit button option. On Mac it is CmdOptionP.

Another option is to just do the commit from the commit dialog using the default "commit" option. Then when it is done open the VCS Quick Menu (AltBackquote (`) for windows; Ctrl+V on Mac) and then do the push from there, either by number or narrowing down via inline search for "push"

Bechuanaland answered 2/10, 2013 at 18:52 Comment(2)
Sorry for the cross post with @Kyptic's comment. I started typing this up before he posted, but got side-tracked in an IM chat, then came back to post.Bechuanaland
That's ok, your answer is more elaborate and nicely formatted. I'll upvote his comment also.Gangue
M
8

In the commit dialogue, press optionshiftreturn to bring up the options, and return to commit.

Monda answered 4/11, 2015 at 16:28 Comment(0)
Y
3

After analyzing all these answers above, I wasn't satisfied and I found following solution:

  1. Open commit dialog Cmd + K.
  2. Type your commit message.
  3. Switch to commit button Tab
  4. Press button Space
Yim answered 4/6, 2020 at 11:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.