我用 LinuxLinux学习之路程序员

git 设置代理,用户名,邮箱

2018-07-03  本文已影响7人  醉里挑灯看剑422
git config --global http.proxy 'socks://127.0.0.1:1086'(根据你代理不同,也可能是http://127.0.0.1:{port})
git config --global https.proxy 'socks://127.0.0.1:1086'

--使用完后取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global(or --local) user.name zhangsan
git config --global(or --local) user.email zhangsan@xxx.com

解释

git config 可以设置git的仓库或全局属性,可以通过help了解详情

git config --help

下面简单列举常用参数

参数 说明
--local 设置仓库属性,默认
--global 设置全局属性
--list 列出所有属性
--unset 删除属性
上一篇 下一篇

猜你喜欢

热点阅读