cloud-bigdata-book
cloud-bigdata-book copied to clipboard
git实践
https://github.com/xirong/my-git
https://github.com/oldratlee
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://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index
https://git-scm.com/docs/git-submodule
http https 保存认证信息
https方式每次都要输入密码,非常不爽
按照如下设置可只输入一次
记住密码(默认15分钟):
git config --global credential.helper cache
自己定义时间(一小时后失效):
git config credential.helper 'cache --timeout=3600'
永久存储密码:
git config --global credential.helper store