Created
April 28, 2012 20:37
-
-
Save kmcallister/2521834 to your computer and use it in GitHub Desktop.
update mosh repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
git fetch keithw | |
was_master= | |
if out=$(git symbolic-ref HEAD); then | |
if [ "$out" = "refs/heads/master" ]; then | |
git checkout HEAD@{0} | |
was_master=yes | |
fi | |
fi | |
git push . keithw/master:master | |
git push origin master | |
if [ -n "$was_master" ]; then | |
git checkout master | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment