git重要配置

git重要配置

防止windows下自动转码LF到CRLF的方法

git config --global core.autocrlf false

git log的别名,参考:廖雪峰+git+自定义git+配置别名

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Git 自动保存用户名和密码,参考《一名宅》的博客

#长期的方法
git config --global credential.helper store
#临时方法:一小时内不关机则不用重新输入密码
git config credential.helper 'cache --timeout=3600'
原文地址:https://www.cnblogs.com/liq07lzucn/p/14460547.html