执行了 git reset --hard
后,git status
会在 Changes not staged for commit:
部分列出文件。
我还尝试了 git reset .
、git checkout -- .
和 git checkout-index -f -a
,但都无济于事。
那么,如何才能摆脱这些未暂存的更改呢?
这似乎只影响 Visual Studio 项目文件。奇怪。请参见此粘贴: http://pastebin.com/eFZwPn9Z。这些文件的特殊之处在于,在 .gitattributes 中我有:
*.sln eol=crlf
*.vcproj eol=crlf
*.vcxproj* eol=crlf
另外,我的全局 .gitconfig
中 autocrlf
被设置为 false。这是否有相关性呢?
.
代表当前目录,而不是根目录。 - Alexander.gitattributes
,现在在另一台机器上(Linux),从主仓库pull之后,某些文件出现了修改,即那些具有eol=crlf
的文件... - szx