Skip to content

Instantly share code, notes, and snippets.

@skurhse
Created March 15, 2023 01:11
Show Gist options
  • 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