Skip to content

Instantly share code, notes, and snippets.

@grodzik
Created August 29, 2012 20:50
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 grodzik/3518769 to your computer and use it in GitHub Desktop.
Save grodzik/3518769 to your computer and use it in GitHub Desktop.
git unpublish alias
unpublish = "!sh -c 'if [ -n \"$1\" ]; then CURRENT=$1; else CURRENT=$(git symbolic-ref HEAD); fi; CURRENT=${CURRENT##*refs/heads/}; git push origin :refs/heads/$CURRENT; git config --unset branch.${CURRENT}.merge; git config --unset branch.${CURRENT}.remote;'" --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment