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

简介: git clone时,经常遇到速度极慢的情况,可以通过设置代理解决。直接上bash命令:git config --global http.proxy 'socks://127.
  • git clone时,经常遇到速度极慢的情况,可以通过设置代理解决。直接上bash命令:
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 删除属性
目录
相关文章
|
5月前
|
开发工具 数据安全/隐私保护 git
Git切换本地用户名,IDEA集成Git如何切换本地用户名
Git切换本地用户名,IDEA集成Git如何切换本地用户名
94 3
|
5月前
|
开发工具 git
Git的基本设置
Git的基本设置
|
11天前
|
开发工具 git
git如何修改提交代码时的名字和邮箱?
git如何修改提交代码时的名字和邮箱?
27 4
|
17天前
|
前端开发 开发工具 git
如何清理 docker 磁盘空间+修改 Gitea 服务器的 Webhook 设置+前端一些好学好用的代码规范-git hook+husky + commitlint
如何清理 docker 磁盘空间+修改 Gitea 服务器的 Webhook 设置+前端一些好学好用的代码规范-git hook+husky + commitlint
23 5
|
1月前
|
网络协议 开发工具 网络虚拟化
SourceTree git 配置代理
SourceTree git 配置代理
30 1
|
2月前
|
开发工具 git
【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
|
2月前
|
开发工具 git
Git使用经验总结2-配置用户名邮箱
Git使用经验总结2-配置用户名邮箱
35 0
|
4月前
|
Linux 开发工具 git
如何为 Git 配置邮箱地址
如何为 Git 配置邮箱地址
81 10
|
3月前
|
开发工具 git
文本,vitepress如何配置社区账号,如何设置git或者某站的社区账号,这里如何进行配置
文本,vitepress如何配置社区账号,如何设置git或者某站的社区账号,这里如何进行配置
|
3月前
|
开发工具 git
vscode设置 git提交代码忽略node_modules,dist,vscode如何设置不提交node_modules,dist
vscode设置 git提交代码忽略node_modules,dist,vscode如何设置不提交node_modules,dist
366 0

相关实验场景

更多