GitGit TipsGit 使用技巧Git 使用小技巧取消 sslVerify 应对 SNI 阻断1 git config --global http.sslVerify false 使用 SSH 替代 HTTP 方式拉取 Repo尤其适合 Golang 从私有仓库拉取包~/.gitconfig1 2 3 4 [url "git@github.com:"] insteadOf = https://github.com/ [url "git@gitlab.com:"] insteadOf = https://gitlab.com/ 1 2 3 4 5 6 7 8 9 10 # 或者: git config --global \ url."git@gitlab.com:groupName/projectName.git".insteadOf \ "https://gitlab.com/groupName/projectName.git"` # 全局替换,拉取域名下的所有包 git config --global url."git@gitlab.yoursite.com:".insteadof "https://gitlab.yoursite.com/" git config --global url."https://".insteadOf "git://" Git 跟踪文件更改1 git log --follow routes/admin/contract_operation.js 使用 HTTP/1.11 git --global config http.version HTTP/1.1 使用gitlab作为go mod私服git-configgithub-git-cheat-sheet