整理自Using a socks proxy with git for the http transport
I tested with Git 1.8.2 and SOCKS v5 proxy, following setting works for me:
git config --global http.proxy 'socks5://127.0.0.1:7070'
For working with https protocol, you may also config "https.proxy"
option:
git config --global https.proxy 'socks5://127.0.0.1:7070'
If you does not want to set the proxy as global config, try ALL_PROXY=
e.g.:
$ ALL_PROXY=socks5://127.0.0.1:8888 git clone https://github.com/some/one.git