Some useful Git configuration for Windows

I’ve recently been working on Windows with a relatively involved git repository and ran into a bunch of issues. Setting these configuration values turned out to be very helpful!

# Allow symlinks
git config --global core.symlinks true

# Don't automatically change file endings to \r\n (carriage return + line feed)
git config --global core.autocrlf false

# Use line feed for line endings
git config --global core.eol lf

# Allow long paths in the repo
git config --global core.longpaths true

It’s also useful to set these as configuration values in .gitattributes in a repository to share this configuration with other people working on it.

  • Git resources : A post with some resources to better understand git, along with some useful git configuration.
Feel free to tweet to me or send me an email with your comments.
Want a weekly digest of these blog posts?