Trying to fix line-endings with git filter-branch, but having no luck

后端 未结 8 939
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 09:02

I have been bitten by the Windows/Linux line-ending issue with git. It seems, via GitHub, MSysGit, and other sources, that the best solution is to have your local repos set

8条回答
  •  旧巷少年郎
    2020-11-22 09:38

    Follow these steps if none of other answers works for you:

    1. If you are on Windows, do git config --global core.autocrlf true; if you are on Unix, do git config core.autocrlf input
    2. Run git rm --cached -r .
    3. Delete the file .gitattributes
    4. Run git add -A
    5. Run git reset --hard

    Then your local should be clean now.

提交回复
热议问题