Reputation: 21
I have the following odd behavior on Team Explorer for Visual Studio Professional 2013 on git:
When I use the command line and do git status on the project directory, it will show me the changed/added files. I can call git add on these files and commit them just fine via the CLI. After I do so, I can go to Visual Studio and push these files, and the changes will sync just fine on the remote server (visual studio online repo). However, in Visual Studio's Team Explorer changes UI, none of these files were showing up in tracked or untracked changes. When I save these files, the little status icon flashes with the "changed" and then immediately switches to "committed" even though it's clear it hasn't been committed.
I've ensured that I have the git tools installed, that the local working directory matches the git project I used with the command line (with the .git folder there), the solution is on the same level as the .git folder, and none of these files are in .gitignore (after all, even if they were, it wouldn't have shown up in the list of files to be added in the command line anyways).
What else should I check? It's at least partially working in that I can sync my local committed changes with the remote repo via Team Explorer. It's just that the changes page is broken. I'm using the CLI for committing changes as a temporary fix, but I'd really like to use the Visual Studio interface instead.
In case its relevant info, I do have another VS solution in the same folder, although I'm not developing it at the moment. I originally cloned this repo via the team explorer.
Thanks in advance.
Upvotes: 1
Views: 1473
Reputation: 1888
I found the solution in another question here: https://stackoverflow.com/a/34747999/1421847
I started using Gulp/Grunt which installed a lot of NodeJS modules that caused a very long path, and the Visual Studio Git integration stopped seeing changes. After deleting the node_modules folder and refreshing the changes view, it started working again until the same Node modules got automatically reinstalled. So adding node_modules to the .gitignore file will probably fix the issue more permanently.
Upvotes: 0
Reputation: 21
I found the problem. I thought I had installed the Git tools extension on Visual Studio, and seeing that certain Git functions like push, pull, and checkout were working, I figured it installed successfully. After I had reinstalled the tools extension, committing and tracking worked again.
Upvotes: 1