I have a feature
branch and a testing
branch (for initial regression). I would like to have a working copy available for my testing
branch for the testing environment. However, I need to compress some of the source code (not into binary, just optimize) via a script. I can enact this script via a post-receive Git hook.
I'm trying to design my bash script (for CI) so that it's fairly robust and want to avoid automation causing Git conflicts. I'm thinking of having a main repository (origin
) and a testing environment repository (ci_test
) simply to allow CI to commit.
I'm thinking about pushing to ci_test/testing
when promoting source. CI should compress, add, commit, fetch from origin/testing
, merge if necessary (taking theirs-full iff conflicts), then push to origin/testing
.
The problem to my model above is that Git complains when I attempt to push to ci_test/testing
because it has a working copy (makes sense, because they may not be synced). Is there a proper (automated) way to use Continuous Integration scripts with Git so that they're still tracked?