I have some file sample_file.doc
which is visible in my IntelliJ IDEA.
If I delete sample_file.doc
file from the local folder it disappear from IntelliJ IDEA, not allowing me to commit the deleted file changes.
I want to commit the deletion so that the deleted file change appear in Git repository.
Please advise how to commit deleted files in IntellJ IDEA?
Recent updates to IntelliJ (2019.3) have broken its ability to easily commit deletions. Presently (2019.3), when you only delete a file, IntelliJ disables the commit option.
To trick IntelliJ, just make a trivial change to any other file, and then open the commit dialog. Unselect the changed file, leaving only the deleted file selected, and then commit. When finished, undo the change to the file you didn't delete.
Or just give up and do it from the command line (which is actually easier, but doesn't afford you some of the nicer dialog options, such as commit message history, etc.).
In IntelliJ IDEA open View → Tool Windows → Version Control, or just press (⌘9 on macOS) or (Alt9 on Windows).
In Version Control panel make sure the Local Changes tab is selected:
There are other pretty handy VSC features that come out of the box with IDEA, for instance:
But you can also run a Terminal window right in IDEA by pressing
and use git status
command to see what is going on:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With