How do I override Git configuration options by command line parameters?

mstrap picture mstrap · Apr 8, 2013 · Viewed 8k times · Source

I want to override certain Git configuration options (in my case http.proxy) when calling a Git command directly by using command line parameters. Is this possible?

Answer

bereal picture bereal · Apr 8, 2013

Yes, you can pass it with -c, like:

git -c http.proxy=someproxy clone https://github.com/user/repo.git