Skip to content

Instantly share code, notes, and snippets.

@ferdef
Created March 19, 2018 11:31
Show Gist options
  • Save ferdef/0a6cfcb3c132f10b467790c9cd5e5cd9 to your computer and use it in GitHub Desktop.
Save ferdef/0a6cfcb3c132f10b467790c9cd5e5cd9 to your computer and use it in GitHub Desktop.
We use a branch for deploying current branches to a sandbox environment. This script automates it
#!/bin/bash
current=`git rev-parse --abbrev-ref HEAD`
deploy_branch=playground
git fetch --prune
git checkout $deploy_branch
git rebase origin/$deploy_branch
git merge origin/$current --no-edit
git push origin $deplot_branch
git checkout $current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment