2

How can I configure IntelliJ to commit and push in a single task (preferably a keyboard shortcut)?

When developing I'm always on a work-in-progress branch and use git commit nearly as often as saving the file. When I'm finished with a task I squash the work done and split it up into logical commits.

But I frequently change my working environment and when I forgot to push I don't have access to the latest commits :-(

Therefore I'd like IntelliJ to git commit & push at once. I know how to do it on the command line but I'd prefer to do it from inside IntelliJ as I'm working there most of the time.

ooxi
  • 3,159
  • 2
  • 28
  • 41

1 Answers1

2

You can use the additional contexts on the 'Submit / Commit button in the commit dialog. See 'Submit / Commit button' here.

The 'automatic' option would be to add a post-commit hook as detailed in this answer.

Peter Reid
  • 5,139
  • 2
  • 37
  • 33