Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
Last active August 3, 2023 15:34
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 cmbaughman/59dc3155721ad94609c251e19697fab0 to your computer and use it in GitHub Desktop.
Save cmbaughman/59dc3155721ad94609c251e19697fab0 to your computer and use it in GitHub Desktop.
Git Keep Line feeds even on Windows

Git Keep Line feeds even on Windows

  • Make sure Windows leaves your line endings alone. This way you can still run shell scripts and things in Git Bash or WSL: git config --global core.autocrlf input

  • Next, after committing any changes you do not have staged, run these:

git rm --cached -r .
git reset --hard

Now you can run shell scripts on Windows Git Bash and you won't have to worry about committing any CRLF files that will break in Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment