Visual Studio 2017 15.3.0 git更改包括“storage.ide”即使.vs / in .gitignore [英] Visual Studio 2017 15.3.0 git changes include "storage.ide" even though .vs/ in .gitignore

查看:924
本文介绍了Visual Studio 2017 15.3.0 git更改包括“storage.ide”即使.vs / in .gitignore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前我升级了VS 2017到15.3.0。从那时起,文件storage.ide保留在我的修改文件中,即使通过我使用为VS建议的.gitignore ,其中包括.vs /文件夹。这包括以下内容。

 #Visual Studio 2015缓存/选项目录
.vs /

然后,我添加了以下内容,以便更详细地说明从要跟踪的文件列表中忽略这一点。

  .vs / SIASAWeb / v15 / sqlite3 / storage.ide 
.vs / ** / storage.ide

团队资源管理器中的更改显示如下:

 <项目文件夹> 
.vs /< project> / v15 / sqlite3
storage.ide

我尝试了git重置这个文件,但是这会在下一次提交时返回,并且也存在于我打开的所有分支中,导致这会阻止从一个分支到另一个分支的轻松转换,即使没有进行任何更改。 / p>

在解决方案资源管理器中,applicationhost.config和.suo文件被标记为忽略,但storage.ide被标记为等待编辑 。

我曾尝试提交,同步到GitHub服务器,关闭并重新打开VS,甚至重新启动计算机。



我的问题是为什么这个文件被作为一个修改过的文件进行维护,即使git应该忽略它。

为了解决这个问题,如果你到了团队资源管理器选项卡并点击管理连接按钮(绿色的顶部),你会看到一个本地Git存储库列表。



右键单击要停止跟踪storage.ide文件的存储库并选择打开命令提示符。



<你应该能够输入以下内容:

  git rm --cached -r .vs 

这将删除.vs文件夹及其内容和子目录,以便在git中进行跟踪。


I upgraded VS 2017 to 15.3.0 a few days ago. Since then file "storage.ide" has remained in my modified files, even through I have used a suggested .gitignore for VS, which includes the .vs/ folder. This includes the following.

# Visual Studio 2015 cache/options directory
.vs/

I then added the following to be more specific about ignoring this from the list of files to be tracked

.vs/SIASAWeb/v15/sqlite3/storage.ide
.vs/**/storage.ide

The Changes in the Team Explorer shows the following:

<project folder>
  .vs/<project>/v15/sqlite3
    storage.ide

I have tried to git reset this file, but this then returns on the next commit, and also exists in all branches which I open, resulting in this then preventing the easy shift from one branch to another even if no changes were made.

In the Solution Explorer the "applicationhost.config" and ".suo" files are marked as "ignored", but "storage.ide" is marked as "pending edit".

I have tried committing, synced to the GitHub server, closing and re-opened VS, and even rebooting the computer.

My question is why this file is being maintained as a modified file, even though it should be ignored for git.

解决方案

To fix this, if you got to the Team Explorer tab and click on the Manage Connections button (the green one a the top) you will see a list of local Git Repositories.

Right click on the repository you want to stop tracking the storage.ide file on and select Open Command Prompt.

You should then be able to type the following:

git rm --cached -r .vs

This removes the .vs folder and its contents and subdirectories from being tracked in git.

这篇关于Visual Studio 2017 15.3.0 git更改包括“storage.ide”即使.vs / in .gitignore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆