Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
  • https://*.github.io/*
  • https://*.githubusercontent.com/*

If you accidentally make a typo in the custom name, you can add .git (only the repository name) or ? at the end in your GitHub URL.

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL.git" -F "code=YOUR_CUSTOM_NAME"
curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL?" -F "code=YOUR_CUSTOM_NAME"

If you want to revoke your custom name, you should contact GitHub Support Team. As of 23 September 2020, you can no longer request to revoke your outdated or incorrect git.io URL.

Shortcut to this Gist: git.io/customurl

@alekssamos

This comment has been minimized.

Copy link

@alekssamos alekssamos commented Aug 14, 2019


Connecting to git.io[54.152.127.232]:443... connected.

Unable to establish SSL connection.

Unable to establish SSL connection.
@FranklinYu

This comment has been minimized.

Copy link

@FranklinYu FranklinYu commented Aug 25, 2019

Note that a long link can only be mapped to one short link.

@koumaza

This comment has been minimized.

Copy link

@koumaza koumaza commented Jun 8, 2020

There is also such a method.
Add .git after the URI.

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL.git" -F "code=YOUR_CUSTOM_NAME"
@dikiaap

This comment has been minimized.

Copy link
Owner Author

@dikiaap dikiaap commented Jun 9, 2020

@koumaza Good catch! I have updated the Gist.

@steinbrueckri

This comment has been minimized.

Copy link

@steinbrueckri steinbrueckri commented Jun 12, 2020

❤️

@yamiacat

This comment has been minimized.

Copy link

@yamiacat yamiacat commented Sep 25, 2020

Please note that as of Sep 2020 GitHub Support is no longer releasing git.io URLs:

https://github.blog/changelog/2020-09-23-git-io-urls-no-longer-released-by-github-support/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.