Update: As of 11 January 2022, git.io no longer accepts new URLs.
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"
Shortcut to this Gist: git.io/customurl
user@debian:~$ curl https://git.io/ -i -F "url=https://raw.githubusercontent.com/undecoded/wgetqo/main/install/node12" -F "code=wgetqo/node"
HTTP/1.1 201 Created
...
Location: https://git.io/wgetqo/node
...
user@debian:~$ wget git.io/wgetqo/node
...
2021-05-22 21:48:49 ERROR 404: Not Found.
Why?