git常用配置

  • git本地配置(走代理), 新建文件~/.gitconfig:
[user]
name = user_name
email = mail_name@mail.com
[core]
excludesfile = /Users/user_name/.gitignore_global
autocrlf = input
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = " "
trustExitCode = true
[commit]
template = /Users/user_name/.stCommitMsg
[https]
proxy = socks5://127.0.0.1:1234
[http]
proxy = socks5://127.0.0.1:1234
[init]
defaultBranch = master