通过代理访问ssh git

ssh -o “ProxyCommand nc -X 5 -x 192.168.4.20:1080 %h %p” root@172.19.6.131

git config http.proxy http://192.168.4.20:8080 http代理

git config http.proxy socks5://192.168.4.20:1080 http代理

curl -x ‘http://192.168.4.20:8080’ http://www.baidu.com

手机上开启http或者socket代理协议

设置代理
git config http.proxy ‘socks5://192.168.4.20:1080’
git config –global https.proxy ‘socks5://127.0.0.1:1080’
取消代理
git config –global –unset http.proxy
git config –global –unset https.proxy

git 代码量统计

增加的代码行数量

git log –stat|perl -ne ‘END { print $c } $c += $1 if /(\d+) insertions/’

精确的代码行修改数量:

git log –author=”$(git config –get user.name)” –pretty=tformat: –numstat | gawk ‘{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf “added lines: %s removed lines : %s total lines: %s\n”,add,subs,loc }’

上面不行就这个:

git log –pretty=tformat: –numstat | gawk ‘{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf “added lines: %s removed lines : %s total lines: %s\n”,add,subs,loc }’