Skip to content

Instantly share code, notes, and snippets.

@aymerick
Forked from stevenh512/gitconfig-git
Created May 2, 2018 14:35
Show Gist options
  • Save aymerick/0cebd7ffce1034a4187a85769b36b8d5 to your computer and use it in GitHub Desktop.
Save aymerick/0cebd7ffce1034a4187a85769b36b8d5 to your computer and use it in GitHub Desktop.
URL rewriting in .gitconfig
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "git@github.com:"]
pushInsteadOf = "git://github.com/"
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"
# Use https instead of git and git+ssh
[url "https://github.com/"]
insteadOf = git://github.com/
[url "https://github.com/"]
insteadOf = git@github.com:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment