Created
May 9, 2016 10:45
-
-
Save andypotanin/5c9b7096fd9ec7deb1c2295cc369f412 to your computer and use it in GitHub Desktop.
Add this to your binary path to deploy things into "latest" branch quickly.
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
#!/usr/bin/env bash | |
## Deploy branch into "develop" branch | |
## | |
## Save Original Branch | |
ORIGINAL_BRANCH=$(git symbolic-ref --short HEAD) | |
echo "Deploying [${ORIGINAL_BRANCH}] into [latest]." | |
## Checkout target branch "develop" | |
git checkout latest | |
## Pull down develop branch | |
git pull | |
## Merge our original branch into the develop branch | |
git merge origin/$ORIGINAL_BRANCH | |
## Push to develop | |
git push | |
## Checkout our original branch again | |
git checkout ${ORIGINAL_BRANCH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment