Enforcing branch state on a staging repo
On our git based hosting, we reuse one site for staging and testing multiple of our feature/issue/integration branches. That site gets its code from a single branch (master), that will not change during the lifetime of the site. Therefore we have to push all changes in that single branch. That makes staying-in-sync-with-the-production site very hard (=impossible).
For solving that, I wrote a little bash script for simply pushing a "diff commit" to the staging repository. You can have a look at here: https://gist.github.com/derhasi/6615981
Usage
- Alter
STAGING_REMOTE
andSTAGING_REMOTE_BRANCH
to your needs - execute
bash staging.sh mybranchtopushtostaging
Written by Johannes Haseitl
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#