随心的博客

好记性不如个烂笔头,随心记录!

返回顶部

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

posted @ 2021-12-01 17:01  yangphp  阅读(124)  评论(0编辑  收藏  举报