Skip to content

Instantly share code, notes, and snippets.

@hugowetterberg
Created April 28, 2009 12:52
Show Gist options
  • Save hugowetterberg/103127 to your computer and use it in GitHub Desktop.
Save hugowetterberg/103127 to your computer and use it in GitHub Desktop.

Usage

$ gist 100434 intelligent-backlink

Checks out the gist 100434 in the folder intelligent-backlink

If someone has forked your repo you can add them as remote when you're inside the gist dir like this:

$ gist 103116 pelle

This will add the gist 103116 as a remote named pelle and fetch from it.

#!/usr/bin/env bash
if [ -d .git ]; then
git remote add $2 git://gist.github.com/$1.git
git fetch $2
else
git clone [email protected]:$1.git $2
mate $2
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment