Created
June 18, 2012 13:21
-
-
Save agborkowski/2948341 to your computer and use it in GitHub Desktop.
bash:profile:command: github push active branch to github, make new feature
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
# GitHub make new feature | |
ghf(){ | |
git checkout master | |
git fetch github | |
git merge --ff github/master | |
git checkout -b $1 master | |
git push -u github $1 | |
echo 'done' | |
} | |
# GitHub push new feature to github | |
ghp(){ | |
git fetch master | |
git merge --ff master/$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
git pull github $(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
git push github $(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
echo 'done' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment