Last active
December 18, 2015 01:38
-
-
Save tgvashworth/5704768 to your computer and use it in GitHub Desktop.
Make staging easy.
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/sh | |
# install: | |
# cd /usr/local/bin && wget -O stage-me https://gist.github.com/phuu/5704768/raw/gistfile1.sh && chmod u+x stage-me | |
branch=`git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3-` | |
echo "Merging ⭠ $branch into ⭠ staging." | |
read -p "Is this correct? [y/N] : " -r | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
git checkout staging && | |
git pull && | |
git merge --no-ff $branch && | |
git push && | |
git checkout $branch | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment