In your path(/usr/bin) add this script with name gitproxy.

#!/bin/sh
_proxy=<proxy-address>
_proxyport=8080

exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport

and in your .gitconfig add to your .gitconfig

[[core]]
       gitproxy = gitproxy