How do I .ignore files with Git GUI?

Darkmage picture Darkmage · Feb 23, 2010 · Viewed 24.5k times · Source

I have created a .gitignore file in the folder with the .git folder, but I still get the files I'm trying to ignore when doing a rescan of the repository.

This is the content of the file.

# Ignored files
*.suo 
*.user 
bin 
obj 
*.pdb 
*.cache 
*_svn 
*.svn 
*.suo 
*.user 
*.build-res 
TestResults 
_ReSharper*

What am I doing wrong? where is the file suppose to be located?

Answer

VonC picture VonC · Feb 23, 2010

You need to make sure the file you are still seeing are not currently committed or staged.

If you remove them (git rm or git rm --cached), and then add them as private file, then they will be ignored.