Answers: <p>From the <a href="https://git-scm.com/docs/git-rev-list" rel="nofollow noreferrer">git documentation</a> around the command <code>git rev-list</code>: </p>
  
  <p><strong><code>git rev-list A...B</code></strong></p>
  
  <p>Try your command syntax like the above (i.e. <code>origin/master...origin/${currentBranch}</code>) </p>
  
Answers: CC BY-SA 4.0
Answers: 2018-09-05T20:13:00.813Z
Answers: 2020-04-21T09:36:26.553Z
Answers: 2020-04-21T09:36:26.553Z
Answers: Imran H.
Body: <p>In jenkins pipeline, execute git command : </p>
  
  <pre><code>git log --format=%B --no-merges origin/master..origin/${currentBranch}
  </code></pre>
  
  <p>jenkins output error :</p>
  
  <pre><code>fatal: ambiguous argument 'origin/master..origin/XOPS-42_AddResultToJIRA': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git &lt;command&gt; [&lt;revision&gt;...] -- [&lt;file&gt;...]'
  </code></pre>
  
  <p>but in my local computer i execute above git command, it work well, how to resolve above error in jenkins</p>
  
Comments: CC BY-SA 4.0
Comments: 2020-04-21T06:25:03.373Z
Comments: Does branch `XOPS-42_AddResultToJIRA` exist? How is `currentBranch` set?
Comments: papanito
Tags: <jenkins><git>
Title: jenkins fatal: ambiguous argument, unknown revision or path not in the working tree
UserDisplayName: Skila Zheng
ThreadText: # jenkins fatal: ambiguous argument, unknown revision or path not in the working tree
  
  (Asked by: username_0 on 2018-07-10)
  
  In jenkins pipeline, execute git command :
  
  ```
  git log --format=%B --no-merges origin/master..origin/${currentBranch}
  
  ```
  
  jenkins output error :
  
  ```
  fatal: ambiguous argument 'origin/master..origin/XOPS-42_AddResultToJIRA': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
  
  ```
  
  but in my local computer i execute above git command, it work well, how to resolve above error in jenkins
  
  **Tags:** jenkins, git
  
  > **Comments:**
  > **username_1**: Does branch `XOPS-42_AddResultToJIRA` exist? How is `currentBranch` set?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-09-05. Score: 1
  
  From the [git documentation](https://git-scm.com/docs/git-rev-list) around the command `git rev-list`:
  
  **`git rev-list A...B`**
  
  Try your command syntax like the above (i.e. `origin/master...origin/${currentBranch}`)
  
  
  ---
  
  