Skip to content

Instantly share code, notes, and snippets.

@abstractmachines
Last active August 27, 2022 15:55
Show Gist options
  • Save abstractmachines/48f1112e5f37863977711abdd3caacbe to your computer and use it in GitHub Desktop.
Save abstractmachines/48f1112e5f37863977711abdd3caacbe to your computer and use it in GitHub Desktop.
git config re: cross-platform EOL and executables core.crlf core.filemode

core.autocrlf (man git-config)

core.autocrlf
   Setting this variable to "true" is the same as setting the text attribute to "auto" on all files and core.eol to "crlf".
   Set to true if you want to have CRLF line endings in your working directory and the repository has LF line endings.            This variable can be set to input, in which case no output conversion is performed.

e.g., CRLF false for EOL in Github POSIX/Windows cross-platform development.

Set git config as such: git config --global core.autocrlf false

man git-config and see core.autocrlf

core.filemode (man git-config)

core.fileMode
   Tells Git if the executable bit of files in the working tree is to be honored.

Set git config as such: git config --global core.filemode false

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