Reputation: 267049
I have a project set up in /home/xxx/project
. My .gitignore
is in /home/xxx/project/.gitignore
, and I'm trying to add the file /home/xxx/project/.idea/workspace.xml
to gitignore. Here's my .gitignore file:
target/
uploads/
*.class
.idea/workspace.xml
All the other lines work, but the last one has no effect, and I keep seeing changes from workspace.xml when I try to commit.
What am I doing wrong?
Upvotes: 0
Views: 718
Reputation: 2948
If you have already set this file for tracking in Git, it's too late to add it to .gitignore and see the behavior your expecting.
What I would do is:
git status
(should not show the file)Upvotes: 3