I had a similar problem, where i am behind my corporate proxy. I basically have two kinds of repositories:
- External- which need proxy
- Internal- which don't need proxy
I had to set a proxy in global config, which would act as the default, if not otherwise specified in local config.
So below are the commands for configuration:
set global config with proxy
git config --global --add http.proxy "http://username:password@proxydomain:port"
git config --global --add https.proxy "https://username:password@proxydomain:port"
then move to your local directory that contains your .git folder and for which you don't need proxy
cd "C:\Users\username\directory_without_proxy\"
set local config with empty proxy
git config --local --add http.proxy ""
git config --local --add https.proxy ""
It could be done the other way too. That is, you keep the global config as empty and local config with your proxy settings.
Just to double check you can use below command to list down the config settings for global and local respectively:
git config --global --list
git config --local --list
http://
for both http and https. – Bowhead