Visual Studio TFS Git not seeing any changes

I had to add this line to my .gitignore:

[path to project]/node_modules/

Apparently VS2015 was crashing on some very long path in there and would just decide to give up all hope


This is more of a workaround than an explanation, but I found that if I ignored the documentation "when you commit changes, Visual Studio simultaneously stages and commits them" and instead added the modifications to staging with the command

git add -u .

then Visual Studio suddenly became aware of the modifications and let me commit them locally and sync them with the TFS server. Moreover it then put the 'new file' green cross on the files I had added and I found I could do another commit and then another sync to pick up the additions and deletions I had made.

Since then Visual Studio is doing what I would expect: when I make a change to the file the file is listed as changed in the commit window.

I still do not know why Visual Studio failed to pick up the changes until after an initial git add but at least it works now.


delete the file myProject\.git\index.lock fixed it in my case.