Skip to content

Instantly share code, notes, and snippets.

@morganestes
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save morganestes/7777d225fde443943ac4 to your computer and use it in GitHub Desktop.

Select an option

Save morganestes/7777d225fde443943ac4 to your computer and use it in GitHub Desktop.
Bash script to shorten a GitHub link using Git.io
#!/usr/bin/env bash
echo `curl -s -i http://git.io -F "url=$1" | tr -d '\r' | sed -En 's/^Location: (.*)/\1/p'`
@morganestes
Copy link
Author

Uses the GitHub URL shortener to make git.io short links from a bash prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment