Git Commit: Deselect all changes by default



At the moment, when I click "Commit Changes", all files and all changes are selected by default. 

I'm used to using SourceTree, picking one change/hunk and committing that change alone, but in IntelliJ I often mistakenly commit changes I didn't intend to commit yet.

Is there any option to have all changes deselected when I click "Commit" ?




No, there is no way and no plans to do so. See

Commit dialog preserves selection from the Local Changes. If you want to commit only specific file, you could select it in the Local changes and invoke commit - only the file will be selected.

It is rather easy to deselect all files - Ctrl/Cmd+A -> Space, however there is a request to add specific control -


Did you change this? My changes aren't selected by default and it's a PITA.


Mine is selecting everything by default and if I don't remember to deselect everything it commits everything, it's a nightmare.  Why would it be assumed that all of my changes will go into a single commit?


You could also use Git Staging Area instead of Changelists. Changes are not automatically added to the staging area when you open the Commit tool window.


Ivan Pajic I'm seeing this problem only in the EAP 2023.3

Selecting the files in the Local Changes tab now checks not only the selected files but also any file that might be currently open in the IDE. Closing all editor tabs before invoking the commit dialog with the desired Local Changes files selected results in the desired behavior. This sounds like a bug given tabs are closed automatically as you work so it doesn't make sense for open tabs to be used to decide what files you want to commit.


Marco Garbelini  I cannot reproduce this behavior. Can you please report it as a bug with screens/steps to reproduce it? 


Please sign in to leave a comment.