<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>

CC BY-SA 4.0
2018-09-05T20:13:00.813Z
2020-04-21T09:36:26.553Z
2020-04-21T09:36:26.553Z
Imran H.
<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>

CC BY-SA 4.0
2020-04-21T06:25:03.373Z
Does branch `XOPS-42_AddResultToJIRA` exist? How is `currentBranch` set?
papanito
<jenkins><git>
jenkins fatal: ambiguous argument, unknown revision or path not in the working tree
Skila Zheng
# 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  [...] -- [...]'

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}`)


---

