Git配置教程

全局设置名称和邮箱:

git config --global user.name "you name"

git config --global user.email "you email"

如果针对某个项目设置的话,去掉global即可

git config  user.name "you name"

git config  user.email "you email"

查看当前项目配置

git config --list

查看全局配置

git config --global --list

linuxgit提示设置高亮

git config --global color.ui true

window上面出现问题:warning: LF will be replaced by CRLF

原因:需要提交的文件是在windows下生成的,windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示

解决办法:

git config --global core.autocrlf false

但行好事,莫问前程!

本文来自博客园,作者:yangphp,转载请注明原文链接:https://www.cnblogs.com/ypeih/p/15629793.html

原文地址:https://www.cnblogs.com/ypeih/p/15629793.html