Last Updated: February 25, 2016
·
408
· Dave Watts

Surviving git on Windows

All of these involve global configuration. Omit the global flag to change on a per-repository basis

** Set your details **

git config --global user.email "email@address"
git config --global user.name "My Name"

Use your most-frequestly used credentials here

** Set CRLF handling **

git config --global core.autocrlf true

Without this, git will change all your linefeeds and really make commits difficult

** Set Permissions handling **

git config --global core.fileMode false

Without this, git will change all your file permissions to suit Windows. if you're on Windows, you're not looking at file permissions

Set password storage

git config --global credential.helper store

This will permanently store your git credentials, albeit as plain text (see http://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-github for better solutions)