Pull all commits from a branch, push specified commits to another
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,