Is there anyway with Jenkins Git plugin to set merge-strategy option to 'theirs'?
git, jenkins, merge
Solution
I don't believe it is possible to set a merge-strategy option using the Jenkins Git plugin. What I did as a workaround was to delete the additional behavior "Merge before build". Then on the "Build" phase add a build step "Execute shell" and call the commands you were trying to execute.
Problem
I'm using Jenkins with the Git Plugin. Facts: - I have 2 branches `develop` and `rc` with the same ancestor. - `develop` is at commit `635d361d2005f74dd55f274bf409d43d6413d9b0` - I'm try to merge `develop` it into `rc` - A change has been made to a file `x.html` independently in both branches that causes a conflict when merging - I always want `develop` changes to trump `rc` changes when conflict occurs In the project via the git plugin, I've added an additional behavior "Merge before build" and I can set the strategy to be "recursive". This configuration generates a merge that looks like this when run: ``` git checkout -f origin/rc git merge -s recursive 635d361d2005f74dd55f274bf409d43d6413d9b0 ``` However, I can't seem to specify the any strategy options, so this just generates a conflict. Specifically I'm trying to do a merge accept theirs on conflict like below: ``` git checkout -f origin/rc git merge -s recursive --strategy-option theirs 635d361d2005f74dd55f274bf409d43d6413d9b0 ``` Can this be achieved with the plugin?