slava
slava

Reputation: 837

Git: remove already ignored and removed from cache files from IntelliJ Changelist

Already use many time command git rm --cached -r .idea and already added .idea dir to .gitignore but still this files in IntelliJ Changelist and waiting to commit:

idea git commit

What is the status of these files in git? How to remove this files from this Changelist without removing files from file system?

Upvotes: 0

Views: 469

Answers (1)

LeGEC
LeGEC

Reputation: 51800

Once you have run git rm --cached -r .idea, you have to run git commit.

If you look more closely at your GUI, you can see that there is a "23 deleted" mentioned above the commit message input field.


If adding the .idea/ directory was a mistake you did in your very last commit, and you want to do as if you had never added it, you can run git commit --amend (or tick the "Amend" checkbox in your GUI).

This will rewrite your last commit.

Upvotes: 2

Related Questions