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.

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Wow that context menu was so obvious, I didn't even notice it's content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.