Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active September 13, 2017 06:12
Show Gist options
  • Save iguoli/5ae09e7746440fc7813a722086c4b25c to your computer and use it in GitHub Desktop.
Save iguoli/5ae09e7746440fc7813a722086c4b25c to your computer and use it in GitHub Desktop.
git的一些配置命令

保存用户名和邮箱

git config --global user.name ***
git config --global user.email ***

下面命令在使用https方式传输git文件时缓存用户名及密码,避免每次git push都要输出一次

git config --global credential.helper 'cache --timeout=86400'

下面命令在使用https方式传输git文件时通过代理来连接

git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080

使用vim作为默认编辑器

git config --global core.editor vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment