Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 622
sanity Avatar asked Oct 02 '13 16:10

sanity


People also ask

How do you do commit and push in Git?

When you're ready, click Commit or Commit and Push ( Ctrl+Alt+K ) to push the changes to the remote repository immediately after the commit. You will be able to review the current commit as well as all other commits before they are pushed to the remote.


1 Answers

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"

like image 68
Javaru Avatar answered Sep 24 '22 08:09

Javaru