title: Git Parallel Builds Merge Conflicts Automatic Resolution
body: <p>We currently in transition to git. We have a parallel build system using GIT as a source control. In general each build agent (Jenkins node), clones the origin, changes the same version file, builds the version, commits the changes, tags the version and pushes the changes (version file and tags) back to the origin. All is done on a single master branch. However I encounter the merging issues.</p>
  <p>In the beginning it was (on each node):</p>
  <ol>
  <li>Clone</li>
  <li>Change version file</li>
  <li>Tag</li>
  <li>Commit file</li>
  <li>Push &lt;--- This fails because Git says I must pull before, because of changes that were done to the version file by parallel build.</li>
  </ol>
  <p>Then I tried to change it to.</p>
  <ol>
  <li>Clone</li>
  <li>Change version file</li>
  <li>Pull &lt;-- This fails because it says it will overwrite the local changes to the version file.</li>
  </ol>
  <p>Same happens if the file is committed first.</p>
  <p>Goes without saying that it all must be done automatically without human intervention.</p>
  <p>UPDATE: I guess what I am trying to find is the pull command which merges the changes automatically in any case. I was trying to do &quot;git pull -s ours origin master&quot;. But it didn' work. Still says there are merge conflicts which need to be resolved.</p>