I have a git project I work on using Visual Studio 2013 and Git.
I have noticed many, if not all, files listed in my .gitignore
file are still being listed as pending changes in the Team Explorer window.
However, when doing a git status
using bash, I don't see the files (as would be expected).
Why is this happening, and more importantly, how can I have Visual Studio treat my .gitignore
file the same as git bash?
.gitignore
file:
Pending Changes Window (Team Explorer):
I was having the same problem with linked files. Team Explorer claimed I was adding the linked files, so I added them all to my .gitignore
. git status was now clean, but Team Explorer continued to show these files as being added.
Right clicking the list of files in Team Explorer changes and selecting Undo seemed to work. The files themselves were not deleted, and they were removed from my list of changes.
Seems like Team Explorer just doesn't immediately pick up on changes to .gitignore
. Hope this helps.
To make Visual Studio 2013 include changes you made to the .gitignore file, delete the file ms-persist.xml in your solution's .git folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With