jemtan990
jemtan990

Reputation: 453

Visual Studio Team Explorer is listing changes to files I didn't make

For Example, I just started visual studio to find 28 changes to files I've never even opened. When I try to undo the changes (right clicking and selecting undo), I get a dialog box to confirm. I click yes, and then nothing happens.

A colleague of mine says this happens to him sometimes and he hasn't found a solution outside of starting over. Since that's so unsatisfying, does anyone else know why this is happening, or how to fix it?

I'm using Visual Studio 2015 on Windows 10

Upvotes: 3

Views: 4573

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51183

Just as Edward Thomson commented,it's probably a line ending issue.

You could run git diff -w command to verify what is really changed in files to understand if you really have a Line Ending Issue.

The -w options tells git to ignore whitespace and line endings, if this command shows no differences, you are probably victim of problem in Line Ending Normalization.

Detail solution please check this blog: Git showing file as modified even if it is unchanged

Also take a look at this question in Stackoverflow: Trying to fix line-endings with git filter-branch, but having no luck


Update

To undo the pending changes, try to use below workaround, open the solution in VS2013 and undo the pending changes in the Team Explorer with VS2013. Finally reopen it in VS2015. The pending changes will go away.

Details please refer a similar question in MSDN: VS2015 and TFS Git – can’t undo changes

Upvotes: 2

Related Questions