I have some files that I don't want to share between my repositories. I added them to .gitignore
at the root of my project :
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore
# ...
.idea/
And yet I keep getting this error when pulling remote changes using git pull
:
error: Your local changes to the following files would be overwritten by merge :
.idea/workspace.xml
Please, commit your changes or stash them before you can merge.
Aborting
I have seen some questions about this error message, but they were about overwriting the files. I want to ignore the changes (I don't want git to track them at all and I don't want git to change my local files).
What am I doing wrong ? Maybe the problem is I created the .gitignore
file after I had already committed the files I wanted to ignore, and I need to remove them from the repo somehow...?