Skip to content

Instantly share code, notes, and snippets.

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