Skip to content

Instantly share code, notes, and snippets.

@tkaczenko
Last active March 25, 2024 14:21
Show Gist options
  • Save tkaczenko/90f9fde416dc91d132830e9540941f7d to your computer and use it in GitHub Desktop.
Save tkaczenko/90f9fde416dc91d132830e9540941f7d to your computer and use it in GitHub Desktop.
Correct settings for Git for Unix, Windows

Correct settings for Git for Unix, Windows

You can find that you haven't made any useful changes in the repository, but Git thinks that you did: the diff is in CRLF to LF or opposite. In general, this issue occurs for Windows.

In Windows, it's better to set

git config --global core.autocrlf false

In Unix-like system (Linux, MacOS), it's better to set

git config --global core.autocrlf input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment