Skip to content

Instantly share code, notes, and snippets.

@matthewmccullough
Created December 31, 2011 18:16
Show Gist options
  • Save matthewmccullough/1544821 to your computer and use it in GitHub Desktop.
Save matthewmccullough/1544821 to your computer and use it in GitHub Desktop.
Alternate URLs (insteadOfs) for GitHub Git repos
[url "git://github.com/"]
insteadOf = "ghg://"
pushInsteadOf = "ghg://"
# Example: git clone ghg://ntschutta/emacs
[url "git://github.com/matthewmccullough/"]
insteadOf = "ghgm://"
pushInsteadOf = "ghgm://"
# Example: git clone ghgm://hellogitworld
[url "git@github.com:"]
insteadOf = "ghs://"
pushInsteadOf = "ghs://"
[url "git@github.com:matthewmccullough/"]
insteadOf = "ghsm://"
pushInsteadOf = "ghsm://"
[url "https://github.com/"]
insteadOf = "ghh://"
pushInsteadOf = "ghh://"
[url "https://github.com/matthewmccullough/"]
insteadOf = "ghhm://"
pushInsteadOf = "ghhm://"
@matthewmccullough
Copy link
Author

Put this in your ~/.gitconfig file or in a project's .git/config file for easier use of GitHub. Just use gig:// or any of the other short hands instead of the full URLs.

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