Skip to content

Instantly share code, notes, and snippets.

@jarek-przygodzki
Created November 28, 2019 07:45
Show Gist options
  • Save jarek-przygodzki/7e6196bdd4f98bcc9e3a15c7fc3ddf0c to your computer and use it in GitHub Desktop.
Save jarek-przygodzki/7e6196bdd4f98bcc9e3a15c7fc3ddf0c to your computer and use it in GitHub Desktop.
Force Git to use LF everywhere

It's safe to use LF everywhere now

git config --global core.eol lf
git config --global core.autocrlf input

Make sure all local files are recreated with the correct line-endings

git checkout-index --force --all

or remove everything from local copy and update them

git rm --cached -r .
git reset --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment