Git Config
config 配置指令:git config
Config 配置级别
- system(系统级别)
- global(用户级别)
- local(仓库级别)
覆盖优先级为local > global > system。优先读取local,其次是global,最后是system。
查看配置
读取system级别的配置:git config —system —list 读取global级别的配置:git config —global —list 读取local级别的配置:git config —local —list
修改配置
如果想修改配置的话,加上不同的参数就可以在不同的级别上配置了。
比如配置global级别的信息:
git config —global user.name “yourusername” git config —global user.email “youremail@email.com”
删除配置
git config —unset user.name
GitHub 快速设置
# 或者在命令行上创建一个新的存储库echo "# DemoCodes" >> README.mdgit initgit add README.mdgit commit -m "first commit"git branch -M mastergit remote add origin https://github.com/xiangyisheng/DemoCodes.gitgit push -u origin master# 或从命令行推送现有存储库git remote add origin https://github.com/xiangyisheng/DemoCodes.gitgit branch -M mastergit push -u origin master

