Add this helper function to your ~/.bash_profile (or ~/.bashrc, or whatever you use) to create custom short links for your GitHub projects without having to remember the whole cURL command!
If you use a file other than ~/.bash_profile to configure your terminal, substitute that value in the installation instructions below.
- Open your
~/.bash_profile - Copy-paste the
gitlinkfunction into it - Save the file
- Run
source ~/.bash_profile
To create a git.io short link:
$ gitlink https://github.com/gramps-graphql
# => https://git.io/vxnTaTo specify a custom short link:
$ gitlink https://github.com/jlengstorf/bemmit bemmit
# => https://git.io/bemmitNOTE: Custom short links can only be assigned if A) no short link has already been created for the long URL and B) the custom short link is not already in use.