Skip to content

Instantly share code, notes, and snippets.

@jcjones
Last active August 29, 2015 14:27
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 jcjones/59f1967fd9bb72aa452b to your computer and use it in GitHub Desktop.
Save jcjones/59f1967fd9bb72aa452b to your computer and use it in GitHub Desktop.
#!/bin/bash
TOPIC=$(git symbolic-ref --short HEAD 2>/dev/null)
DEST=master
die() {
echo $@
exit 1
}
git pull --rebase origin ${DEST} || die
git push origin HEAD:refs/for/${DEST}/${TOPIC}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment