I have a following case:
I made a .gitignore
on gitignore.io
. The .idea
folder and project_name.iml
were not in the ignore list and were pushed into the repo. I added them into the .gitignore
, but they remain in the repo. If I make any changes to them, they appear in the list of changed files to commit.
There is a way to get rid of them through the terminal
git rm -r --cached .idea/
But is it possible to start ignoring changes in those files and remove them from the repo by the IDE without using terminal?
CodePudding user response:
- Remove the file/folder in Project tool window via the "del" key:
- Invoke "Undo" action to get them back. You will be asked if you want to add the files to git.
- Click "NO"
- Commit changes. The removed/re-added folder will be removed from git in the scope of this commit.