# 配置全局用户名
git config --global user.name "你的用户名"
# 配置全局邮箱
git config --global user.email "你的邮箱@example.com"
# 查看配置
git config --global user.name
git config --global user.email
# 查看所有全局配置
git config --global --list
如果只想为当前仓库配置用户名和邮箱,去掉 --global 参数:
git config user.name "你的用户名"
git config user.email "你的邮箱@example.com"
git config --global http.proxy socks5://127.0.0.1:7890
git config --global https.proxy socks5://127.0.0.1:7890
git config --global --unset http.proxy
git config --global --unset https.proxy