-1

https://i.stack.imgur.com/7RqIW.png

As you can see, there is many files remove and add same code line, and it happened a lot.

I wonder why and how to avoid this?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

This generally happen when git changes the eol (end-of-lines) on all files, because of a global config like core.autocrlf.

Since all the lines are modified, git considered they are all "removed" and replaced with new ones.

Try:

git config --global core.autocrl false

Then clone again your repo, work on it, commit and see if you still list similar logs.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250