我已将 core.autocrlf
选项更新为 true(在 Windows 下);现在我想重新规范我的 git 存储库。我怎样才能做到这一点?
最佳答案
git rm --cached -r .
# Remove everything from the index.
git reset --hard
# Write both the index and working directory from git's database.
git add .
# Prepare to make a commit by staging all the files that will get normalized.
# This is your chance to inspect which files were never normalized. You should
# get lots of messages like: "warning: CRLF will be replaced by LF in file."
git commit -m "Normalize line endings"
# Commit
引用:https://help.github.com/articles/dealing-with-line-endings
关于git - 如何重新规范化我的 git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22109740/