Visual Studio - AppBuilder - Git Hub - .sou file issue

吃可爱长大的小学妹 提交于 2019-11-29 18:12:48

You should not be checking in .suo files into Git, they contain user data that should not be shared. Instead, you should be marking them to be "ignored" by Git, so that they will never be checked in and never detected as an untracked file.

However, Git will only ignore files that are not already in the repository. So you must remove them before you can ignore them.

First, add the .suo file to your .gitignore. Create a .gitignore file at the base of your Git repository, and add the following line to it:

*.suo

Or, better yet, download the VisualStudio.gitignore file and name it .gitignore, placing it at the root of your repository. This file is an excellent set of .gitignore rules for Visual Studio projects. (And if you had created your project in Visual Studio it would have prompted you to set this up - but don't worry, it's not too late!)

Next, remove the .suo file from your repository. If the .suo file in question is MySolution.suo:

git rm --cached MySolution.suo
git commit -m"Remove .suo file" MySolution.suo

Now when Visual Studio changes your .suo file, you will not be prompted to add it or check it in.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!