Open heidsoft opened 7 years ago
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
取消
git config --global --unset http.proxy
git config --global --unset https.proxy
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
done
https://stackoverflow.com/questions/11258737/restore-git-submodules-from-gitmodules
https方式每次都要输入密码,非常不爽
按照如下设置可只输入一次
记住密码(默认15分钟):
git config --global credential.helper cache
自己定义时间(一小时后失效):
git config credential.helper 'cache --timeout=3600'
永久存储密码:
git config --global credential.helper store
https://github.com/xirong/my-git