I have the following branches:
master
production
and the following remote branches:
origin/master
origin/production
I have a script that fetches the origin/master
branch and gets the diff of what changed from my last fetch (log -p master..origin/master
). Then I merge origin/master
.
The commits found are pushed to a code review tool.
I want to push the successful commits – and only them – to the production branch, and then of course to origin/production
.
How can I do so?
Also, I have 2 scripts running: the one that fetch from origin/master
, push commits details to a database, and merge, and the other that I'm currently writing that will have to push the successful commits.
I'd like to have those 2 scripts running while avoiding race conditions/merge conflict. Since I only want to work with specified commits, maybe there's a way to get rid of the commits that I don't want?
See Question&Answers more detail:os