Skip to content

Instantly share code, notes, and snippets.

@avar
Created January 20, 2010 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avar/282151 to your computer and use it in GitHub Desktop.
Save avar/282151 to your computer and use it in GitHub Desktop.
export FRAGMENT=$(perl -E 'say(map { chomp; $_ } (split m[/], qx[pwd])[-1])')
[ ! -z "$FRAGMENT" ] && git clone --bare . /tmp/$FRAGMENT
[ ! -z "$FRAGMENT" ] && rsync -av --progress /tmp/$FRAGMENT nix.is:/var/cache/git/avar/
[ ! -z "$FRAGMENT" ] && git remote add origin ssh://nix.is/var/cache/git/avar/$FRAGMENT
[ ! -z "$FRAGMENT" ] && git config branch.master.remote 'origin'
[ ! -z "$FRAGMENT" ] && git config branch.merge 'refs/heads/master'
[ ! -z "$FRAGMENT" ] && git config branch.master.merge 'refs/heads/master'
git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment