title: Jenkins pipeline fails after merge
body: <p>Context:</p>
  <ul>
  <li><p><code>featureBranch</code> has been forked from <code>sprintBranch</code> and now needs to be merged into it</p>
  </li>
  <li><p><code>file[A-C]</code> where changed in <code>featureBranch</code> creating a conflict with <code>sprintBranch</code></p>
  </li>
  <li><p>changes from <code>featureBranch</code> are to be kept</p>
  </li>
  <li><p>after a merge of <code>sprintBranch</code> into <code>featureBranch</code> (no files were changed in <code>sprintBranch</code> pipelines in jenkins have started to fail</p>
  <p>$ git log
  commit ce90629c1f6a796a9e1b9ebf9f03641ecffeeabd (HEAD -&gt; featureBranch, origin/featureBranch)
  Merge: f261cec59 dca640165
  Author: userA
  Date:   Wed Aug 3</p>
  <pre><code> Merge remote-tracking branch 'sprintBranch' into 'featureBranch'
  
   # Conflicts:
   #       code/fileA
   #       code/fileB
   #       code/fileC
  
  commit f261cec591f05979c769c272ef2cba135414a6e9
  Author: userB
  Date:   Wed Aug 3 
  
   Commit msg #1
  
  commit e22e68756637ed7e628a2de6e45bf8b36f5a5127
  Author: userB
  Date:   Tue Aug 2 
  
   Commit msg #2
  </code></pre>
  </li>
  </ul>
  <p>After conflicts were resolved and a push was made to <code>origin/featureBranch</code> even though there were no changes, the following occurs on jenkins that uses the following pipeline:</p>
  <pre><code>Nodes.node(this, &quot;name&quot;, &quot;proj&quot;) { podLabel -&gt;
      node(podLabel) {
          try {
              stage('Checkout') {
                  cleanWs()
                  checkout scm
              }
              LongCommitID = sh(returnStdout: true, script: &quot;git rev-parse HEAD&quot;).trim()
  
              SdkNotifier.buildStarted(&quot;bitbucketURL&quot;,
                      credentials,
                      LongCommitID,
                      BitbucketAccessToken)
                      
  </code></pre>
  <p>producing:</p>
  <pre><code>  hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No such property: LongCommitID for class: WorkflowScript
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:471)
      at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:355)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:313)    
  </code></pre>
  <p>Running locally we get the <code>HEAD</code> correctly.</p>
  <pre><code>$ git rev-parse HEAD
  ce90629c1f6a796a9e1b9ebf9f03641ecffeeabd
  </code></pre>
  <p>If the files that are in conflict in the current branch that is to be merged into another,
  are left unchanged in the current branch, where are they being pushed to? The target branch, right?</p>