Reputation: 5144
I'm having a tracked file in git but now I don't want to track it anymore (I don't want it to show up from the next commit but I still want to have it inside the folder).
In the Changes
tool window I have set that file as ignored
in Configured Ignored Files
but somehow when I change that file, the changes still shows up in the change list?
Upvotes: 26
Views: 29859
Reputation: 420
IntelliJ doesn't allow you to untrack added files, but you quit easily can get to the same result as follows:
Version Control
Tool WindowLocal Changes
tab: create a new change list (do NOT make it active)Like so you don't have to botter about (not) adding files. You can add all files and drag 'm into the new changelist if you don't want to commit these files.
Be aware though, when also using git cli, the files are still added to the working directory and will be taken into account when committing. Use the other answers on this page.
Upvotes: 4
Reputation: 1
in WebStorm 2018.2.1 you can do it like this: in version control tab right click unversioned files and ignore file
Upvotes: -1
Reputation: 1951
As of 2017.3.4, you cannot use the IDEA GUI to perform this command, it must be done from the command line or another tool.
From console:
git rm --cached file
git commit -m'file removed'
echo 'file' >> .gitignore
Upvotes: 41