sanity
sanity

Reputation: 35772

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

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?

Upvotes: 17

Views: 8026

Answers (3)

Dejan Pekter
Dejan Pekter

Reputation: 735

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

Upvotes: 3

Javaru
Javaru

Reputation: 31936

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"

Upvotes: 14

Stimp
Stimp

Reputation: 589

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

Upvotes: 8

Related Questions