Skip to content

Instantly share code, notes, and snippets.

@schacon
Created July 21, 2008 21:19
Show Gist options
  • Save schacon/256 to your computer and use it in GitHub Desktop.
Save schacon/256 to your computer and use it in GitHub Desktop.
#!/bin/sh
git stash
git symbolic-ref HEAD refs/heads/$1
rm .git/index
git clean -f -d
# (via johnw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment