How can I remove a file from Git within IntelliJ VCS?
In the terminal, use git rm --cached -r .idea/
.
This will remove the files from the GIT index, but leave the files locally.
To change a file from green (staged) to red (untracked) using Intellij:
- Right click the file(s)
- Hover over
Git
(the git pane will expand) - Click
Rollback...
(in older versionsRevert
) - Check that
Delete local copies of added files
is not checked and click theRollback
button
This will not delete the file, only unstage it (remove it from git's index).