git config --global http.proxy 'socks5://127.0.0.1:1080'
works both http and https
HostName github.com
User zanyxdev
ProxyCommand /usr/bin/nc -X 5 -x 127.0.0.1:1080 %h %p
export GIT_SSH_COMMAND='ssh -o ProxyCommand="nc -X 5 -x 127.0.0.1:1080 %h %p"'