Documentation on github:
Add this to the .gitconfig file:
[http] proxy = http://mydomain\\myusername:mypassword@myproxy.server.com:8080
If you want to restrict the url you want to use this config:
http] [http "https://example.com"] proxy = http://mydomain\\myusername:mypassword@proxy.server.com:port
If there are ssl problems connecting to the git repo - add
[http "https://example.com"] proxy = http://mydomain\\myusername:mypassword@proxy.server.com:port sslVerify = false