heidsoft / cloud-bigdata-book

write book
56 stars 33 forks source link

git实践 #15

Open heidsoft opened 7 years ago

heidsoft commented 7 years ago

https://github.com/xirong/my-git

heidsoft commented 7 years ago

https://github.com/oldratlee

heidsoft commented 6 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
heidsoft commented 5 years ago

子模块处理

#!/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

heidsoft commented 5 years ago

http https 保存认证信息

https方式每次都要输入密码,非常不爽

按照如下设置可只输入一次

记住密码(默认15分钟):

git config --global credential.helper cache
自己定义时间(一小时后失效):

git config credential.helper 'cache --timeout=3600'
永久存储密码:

git config --global credential.helper store