GIT - Can't ignore .suo file

git doesn't ignore files that have been added to the repository. If you want to get it ignored, you have to delete the file from the repository:

git rm --cached project1.suo
git commit -m "Delete suo file from repository"

This will delete the file from the repository, while it's still on your harddrive.


I always back to this question to use the method in the answer but i found a better solution which is to ignore the changes to this file . The method is

git update-index --assume-unchanged project1.suo

or

git update-index --assume-unchanged .vs/config/applicationhost.config

To undo this use --no-assume-unchanged

Tags:

C#

Git