How to auto merge Git branches prior to a Jenkins build?
jenkins
Solution
That's supported by the latest Git Plugin on Jenkins. Just set `Checkout/merge to local branch` to `production` under the Advanced settings for Git in the Job configuration.
Then set the `Branches to build` to master, or just leave it blank to have Jenkins try and merge and build each other branch it finds to production.
It will do one `merge/build` for each branch. It can also push the merged branch back to the source it pulled from.
Check this out: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures
Problem
How to auto merge Git branches prior to a Jenkins build? I have 2 builds, one for branch `master` and one for production. I would like to do Git merge `origin/master` when I do the production build.