gitconfig

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


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?


Solution

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

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