Skip to content

Instantly share code, notes, and snippets.

@bordeo
Created March 20, 2017 14:31
Show Gist options
  • Save bordeo/18e1d840997a6bf1109f7edbef0895a5 to your computer and use it in GitHub Desktop.
Save bordeo/18e1d840997a6bf1109f7edbef0895a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
BRANCH=$1
BRANCHSTG=$2
if [ -z $BRANCH ];
then
echo "You must specify branch"
echo "megeinstaging branch branch-staging"
exit 1
fi
if [ -z $BRANCHSTG ];
then
BRANCHSTG="staging"
fi
git push;
git checkout $BRANCHSTG;
git pull;
git merge $BRANCH;
git push;
git checkout $BRANCH;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment