问题描述
我们已经在文件中添加了.gitignore这个文件project1.suo但每次我们中的一个人都必须提交该项目时,Git似乎告诉我们要提交文件project1.suo。
我们尝试了很多方法在.gitignore中添加文件,如下所示:
*。suo
project1.suo
c: \project\project1.suo
我们无法解决这个问题。
git不会忽略已添加到存储库的文件。如果你想忽略它,你必须从存储库中删除文件:
git rm --cached project1.suo
git commit -m从存储库中删除suo文件
这会将文件从存储库,而它仍然在你的硬盘上。
I'm trying to work using Git - Extension with a colleague, in an application written in C#.
We have been added on the file .gitignore the file "project1.suo" but every time one of us have to commit the project, Git seems tell us to commit the file "project1.suo".
We have tried many method to add the file in .gitignore like that:
*.suo
project1.suo
c:\project\project1.suo
We cannot fix this problem.
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.
这篇关于GIT - 不能忽略.suo文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!