Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 548 Bytes

line-endings.md

File metadata and controls

18 lines (14 loc) · 548 Bytes

Git line endings

Best to handle within a .gitattributes file for consistency across all users.

Great starting point: https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes

If this file was introduced late in the project, reset line endings;

git add . -u
git commit -m "Saving files before refreshing line endings"
git rm --cached -r .
git reset --hard
git add .
# You may see a lot of these messages: "warning: CRLF will be replaced by LF in file."
git commit -m "Normalize all the line endings"