How to normalize working tree line endings in Git? -


i have cloned repository had inconsistend line endings. have added .gitattributes sets text attribute files want normalize. when commit changes message:

warning: crlf replaced lf in file. file have original line endings in working directory. 

how can make git normalize working copy of file me? preferably git normalize entire working tree.

the docs gitattributes provides answer:

$ rm .git/index     # remove index force git $ git reset         # re-scan working directory $ git status        # show files normalized $ git add -u $ git add .gitattributes $ git commit -m "introduce end-of-line normalization" 

do sequence after have edited .gitattributes.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -