VS2017没有使用.gitignore文件? [英] VS2017 not using the .gitignore file?
问题描述
我在VS2015中使用git超过一年。 当我开始在VS2015中进行UWP开发并且现在在VS2017中时,我注意到Visual Studio要求我检查每个重新创建和更新的各种../bin/ ..和../obj/ ..文件。运行
我的单元测试,每次重新编译等。 这些文件夹位于我的.gitignore文件中,命令行git看到并尊重(只要文件尚未签入)。
I have been using git in VS2015 for over a year. When I started doing UWP development in VS2015 and now in VS2017 I notice that Visual Studio wants me to check in all kinds of ../bin/.. and ../obj/.. files that are created and updated by every re-run of my unit tests, every recompile, etc.. These folders are in my .gitignore file which command-line git sees and respects (as long as the files haven't already been checked-in).
VS2017是否忽略.gitignore文件;特别是当UWP文件正在使用时(我在VS2017中只完成了UWP工作)?
$
我在VS2017中错过了哪些设置会导致编辑器阅读或更好地创建一个合适的.gitignore文件?
Is VS2017 ignoring the .gitignore file; specifically when UWP files are being worked with (I have only done UWP work in VS2017)?
Is there some setting I missed in VS2017 that causes the editor to read or better yet create an appropriate .gitignore file?
在使用VS2017 + git + UWP时,其他人如何避免嘈杂的登记请求?
How do others avoid noisy check-in requests when working with VS2017+git+UWP?
推荐答案
您好,
欢迎来到MSDN论坛。
Welcome to MSDN forum.
如果您已经签入了一个文件,并且想要忽略它,那么如果稍后添加规则,Git
将不会忽略该文件。在这些情况下,您必须首先在终端中运行以下命令来解除文件:
If you already have a file checked in, and you want to ignore it, Git will not ignore the file if you add a rule later. In those cases, you must untrack the file first, by running the following command in your terminal:
git rm --cached FILENAME
git rm --cached FILENAME
祝你好运,
Joyce
这篇关于VS2017没有使用.gitignore文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!