Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git - Visual studio team explorer is showing changes that are not actually there

I have been experimenting with git-svn and git integration within Visual Studio 2013 for a short period of time. One issue I'm having is that Visual studio is showing many files as part of the "Included changes" (i.e "modified" files) when in fact they have no changes.

At first glance, research suggest that similar problems appear when line-ending issues exist but:

A) Git in the console runs fine (i.e. git status shows no changes exist).

B) Git line ending normalization has been turned off (both by "git config --global core.autocrlf false" and a "* text=off line" in the .gitattributes file)

Any ideas?

like image 650
Leandro Gomez Avatar asked Jan 22 '26 03:01

Leandro Gomez


1 Answers

First:

  • Use the latest 2.13.2 version of Git (unless Visual Studio 2013 is still based on libgit2, but even though, check if the issue persists in command line, with Git 2.13.2)
  • make sure eol is not involved in your current local repo by triggering a renormalization:

    $ rm .git/index     # Remove the index to re-scan the working directory
    $ git add .
    $ git status        # Check if files are still "modified"
    

Second, check the nature of those "invisible" changes with:

git diff --word-diff-regex=.
# or
git -c color.diff.whitespace="red reverse" diff -R -- afile

Third, check if this is a permission issue (you can unset other core.filemode settings first):

git config core.filemode false
# renormalize as shown above.
like image 144
VonC Avatar answered Jan 23 '26 21:01

VonC