GIT - Can't ignore .suo file

前端 未结 3 991
鱼传尺愫
鱼传尺愫 2021-01-30 02:59

I\'m trying to work using Git with a colleague, in an application written in C#.

We have added the entry "project1.suo" to the .gitignore file but every time o

相关标签:
3条回答
  • 2021-01-30 03:17

    I had the same problem. Ikke's solution helps, but do not forget to remove the *.suo entry from your .gitignore, if it is there. After the file is corrected, do

    git add **/*.suo
    
    0 讨论(0)
  • 2021-01-30 03:39

    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

    0 讨论(0)
  • 2021-01-30 03:43

    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.

    0 讨论(0)
提交回复
热议问题