Skip to content

Instantly share code, notes, and snippets.

@eteubert
Created February 18, 2011 13:51
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 eteubert/833672 to your computer and use it in GitHub Desktop.
Save eteubert/833672 to your computer and use it in GitHub Desktop.
function gfnew () {
git checkout master
git checkout -b $*
}
# make the feature available in dev.ingame.de
# push changes to dev and then checkout featurebranch again
# so you can continue to work on it immediately
function gfdev () {
CURBRANCH=`git branch | grep \* | awk '{print $2}'`
git checkout dev
git pull origin dev
git merge $CURBRANCH
git push origin dev
git checkout $CURBRANCH
}
# release the feature
# push to dev & master (live system) and delete the branch
function gfrelease () {
CURBRANCH=`git branch | grep \* | awk '{print $2}'`
git pull
git checkout dev
git merge $CURBRANCH
git checkout master
git merge $CURBRANCH
git branch -d $CURBRANCH
git push
}
function gflive () {
git tag -f stable
git pull
echo -n "Is everything running smoothly? [y/N] "
read choice
if [ "$choice" != "y" ]; then
git checkout stable
echo "Now fix this and come again."
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment