How to use Git.io to shorten GitHub URLs and create vanity URLs – 049

Suppose you want to shorten the URL to a particular location on GitHub. Or perhaps you want to create a vanity URL that goes directly to your GitHub profile, e.g. https://git.io/saraford. You can use Git.io: GitHub URL Shortener.

To shorten a URL, open your favorite command prompt (via Git Shell) and type in

$  curl -i https://git.io -F "url=https://github.com/saraford/your-moment-of-github-zen/issues"

in the response, you’ll see your shorten URL!

Location: https://git.io/vMdeF

To create a vanity URL for your GitHub profile,

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

in the response, you’ll see a new way to refer to your GitHub profile!

Location: https://git.io/saraford

One thought on “How to use Git.io to shorten GitHub URLs and create vanity URLs – 049

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s