Skip to content

Instantly share code, notes, and snippets.

@DukeyToo
Forked from Kovrinic/.gitconfig
Created March 11, 2020 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DukeyToo/e9628d90ebed6e6730df88d3fa28789b to your computer and use it in GitHub Desktop.
Save DukeyToo/e9628d90ebed6e6730df88d3fa28789b to your computer and use it in GitHub Desktop.
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github

Replace git:// with https://

Rewrite any git:// urls to be https:// but, it won't touch sshurls (git@github.com:)

git config --global url."https://github".insteadOf git://github

or replace with ssh

Use ssh instead of https://

git config --global url."git@github.com:".insteadOf "https://github.com/"

sauce: https://gist.github.com/grawity/4392747 & @hansdg1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment