Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: Git Team Explorer does not show any changes

Tags:

When I first add a project to source control(GIT) it will show all of the files and everything will be peachy. I can continue to work for about 30mins-1hr and all of the changes show up(any file I make changes).

But after some period of time, it shows that no file is edited no matter how many changes I make. I just dont get it...I looked at the .gitignore file and I dont see any of the file types I'm working with so I don't get what the heck is going on.

I am working with a multi-tier MVC application so lots of C#, bunch of .cshtml and so on.

Tips? Google doesnt find anything. Here is the .gitignore file... I got the same issue as this dude...and he got no answer!

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 
like image 558
Spets Avatar asked Sep 26 '14 06:09

Spets


People also ask

How do I see changes in Git Visual Studio?

Select an existing branch in Visual Studio 2019Visual Studio displays the current branch in the selector at the top of the Git Changes window. The current branch is also available in the status bar on the bottom-right corner of the Visual Studio IDE. From both locations, you can switch between existing branches.

How do I commit changes in Git using Visual Studio?

Just enter your commit message and then select Commit All. The equivalent command for this action is git commit -a . Visual Studio also makes it easy to commit and sync with one click by using the Commit All and Push and Commit All and Sync shortcuts.

How do I get the latest code from Git in Visual Studio?

Visual Studio uses the Sync view in Team Explorer to fetch changes. Changes downloaded by fetch aren't applied until you Pull or Sync the changes. In Team Explorer, select the Home button and choose Sync. In Synchronization, select Fetch to update the incoming commits list.


Video Answer


1 Answers

I found VS was holding an .opendb file open, causing a permissions clash when searching for changes. It reported the precise file that was causing the trouble in the Output window, under "Source Control - Git". Adding this to my .gitignore fixed the issue. If a VS restart or a reboot fixes the issue then you're probably closing the offending file handle -- in my case VS opened the problem file every time.

See also Visual Studio TFS Git not seeing any changes for more potential causes.

like image 168
Chris Smowton Avatar answered Sep 21 '22 13:09

Chris Smowton