How to unstage files with no changes in Git?

Viewed 114

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.

1 Answers

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".

Related