Skip to content

Instantly share code, notes, and snippets.

@skurhse
Created March 15, 2023 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skurhse/e6f0bd539cb43f7f14d66210856e0911 to your computer and use it in GitHub Desktop.
Save skurhse/e6f0bd539cb43f7f14d66210856e0911 to your computer and use it in GitHub Desktop.
Reset line endings in the working directory when *enabling* core.autocrlf
#!/usr/bin/env bash
set -x
git --version
git config --global core.autocrlf false
git config --global core.eol crlf
cd /tmp
rm -rf lua-filters/
git clone https://github.com/pandoc/lua-filters
cd lua-filters
dos2unix -ih *
git config core.autocrlf true
git add --renormalize .
git checkout .
dos2unix -ih *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment