c# - Visual Studio : Git Team Explorer does not show any changes

标签 c# git visual-studio

当我第一次将一个项目添加到源代码控制 (GIT) 时,它会显示所有文件,一切都很好。我可以继续工作大约 30 分钟到 1 小时,所有更改都会显示(我更改的任何文件)。

但是一段时间后,它显示无论我做了多少修改,都没有文件被编辑。我只是不明白...我查看了 .gitignore 文件,但没有看到我正在使用的任何文件类型,所以我不明白到底发生了什么。

我正在使用一个多层 MVC 应用程序,所以有很多 C#、一堆 .cshtml 等等。

提示?谷歌没有找到任何东西。这是 .gitignore 文件... 我和这个家伙遇到了同样的问题......但他没有得到答复!

When I save a file with changes, its status automatically goes back to unchanged/committed (blue lock)

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
vsql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store

最佳答案

我发现 VS 正在打开一个 .opendb 文件,导致在搜索更改时发生权限冲突。它在“源代码管理 - Git”下的“输出”窗口中报告了导致问题的确切文件。 Adding this to my .gitignore fixed the issue.如果 VS 重新启动或重新启动解决了问题,那么您可能正在关闭有问题的文件句柄——在我的情况下,VS 每次都打开问题文件。

另见 Visual Studio TFS Git not seeing any changes for more potential causes.

关于c# - Visual Studio : Git Team Explorer does not show any changes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26053552/

相关文章:

c# - AuthenticationContext 不包含 AcquireToken 定义?

c# - 使用 c# 的 Oauth 2.0 到 vimeo。下一步 : uploading a video to vimeo

git - 嵌套包的 Composer 运行脚本

c++ - 有没有办法让 Visual Studio 停止缩进命名空间?

javascript - 配置 Typescript 项目以使用 Bable 从 ES6 转换为 ES5

c# - 读取在 Visual Studio 中作为资源手动添加到项目中的文件

c# - 在 foreach 循环之外使用 IEnumerable 列表

c# - 管理 EntityConnection 生命周期

wordpress - 将 WordPress 保持在版本控制中 - 单独的主题 repo 协议(protocol)

Github疑问-同步repo