Last active
August 29, 2015 14:09
-
-
Save rogeruiz/91843cbe14530497bc1e to your computer and use it in GitHub Desktop.
Proof of concept; a feature branch merge and deploy strategy
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 | |
# Simple script for rebasing your work on top of the sandbox/auth branch. | |
# This script and process is a work-in-progress and won't solve all problems well | |
# or even at all. If there are any issues with this script, please update it as you | |
# see fit. Thanks for playing... | |
# ./sync-sandbox.sh ~/Developer/vidz charlie/auth | |
REPO_DIR=$1 | |
REPO_BRANCH=$2 | |
cd $1 | |
git fetch --all | |
git checkout origin/sandbox/auth | |
git checkout -B sandbox/auth origin/sandbox/auth | |
git rebase origin/master | |
git checkout $2 | |
git rebase --interactive sandbox/auth | |
git checkout sandbox/auth | |
git merge $2 | |
git push origin sandbox/auth | |
git checkout $2 | |
git reset --hard origin/$2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment