I wanted to shorten my GitHub repo's URL using git.io. I wanted a custom name but accidentally used their automatic name, which is full of random characters.
How can I revert this and get a new one?
Join Stack Overflow to learn, share knowledge, and build your career.
I wanted to shorten my GitHub repo's URL using git.io. I wanted a custom name but accidentally used their automatic name, which is full of random characters.
How can I revert this and get a new one?
If someone else created it first, it will return the existing shortened URL. So, it is currently not possible to override but you can contact GitHub support team to either remove or change it.
I discovered following trick though, you can add a harmless query param ?
to make it different:
$ curl -i https://git.io -F "url=YOUR_GITHUB_URL_HERE?" -F "code=YOUR_CUSTOM_NAME"
Hope that helps.
if the URL has a shortener on git.io already you can still create a new one by adding /index.html or JUST the forward slash /
ex. github https://github.com/jgorset/git.io/issues/5 >> https://git.io/vxba7 now you can still create vanity shortener with --code=NAME, adding a forward slash to URL as https://github.com/jgorset/git.io/issues/5/
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/
Another option is to use the url with the .html ending (or the opposite if you already shortened it). For example, if you did this before:
$ curl https://git.io -F "url=https://X.github.io/pages/page" -F "code=CODE"
You could try using this if you don't mind people seeing the .html
extension:
$ curl https://git.io -F "url=https://X.github.io/pages/page.html" -F "code=CODE"