1

I am working with VS 2017.

While committing, I could see some files which had no changes highlighted are present under changes.
There were more than 50 files without any changes are present under changes.

Could anyone please help me with how to remove them from changes and stage only modified files.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Bhargavi
  • 184
  • 12

1 Answers1

2

Check first in command-line your git config core.autocrlf value.

If you see true:

  • close Visual Studio
  • change it to false: git config --global core.autocrlf false (as seen in this thread)
  • Go to your project root folder and (using Git 2.16+) git add --renormalize .
  • open back up Visual Studio

See if all those files are still "changed".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @Bhargavi Exactly: start with updating your Git For Windows to `git version 2.32.0.windows.2`: https://github.com/git-for-windows/git/releases – VonC Aug 10 '21 at 07:13
  • No visual studio, just text editor but these steps worked great, thanks – boardtc Jan 31 '23 at 21:03