从文件中删除的所有行以及在提交中添加到文件的所有行

All lines removed from file and all lines added to file in commit

我正在查看一个提交(在 Bitbucket 中),对于一个给定的文件,比方说,100 行我看到删除了 100 行,添加了 100 行。删除的行和添加的行的内容在缩进和间距方面完全相同。

在什么情况下会出现刚才描述的情况?

要检查这是否是行尾问题,请尝试:

git config --global core.autocrlf false
git clone https://bitbucket.org/user/repo newLocalClone
cd newLocalClone
git status

(同时还有cases where core.autocrlf can help, I prefer setting it to false and working with .gitattributes core.eol directives