HiveBrain v1.2.0
Get Started
← Back to all entries
patterngitMinor

jenkins fatal: ambiguous argument, unknown revision or path not in the working tree

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
paththeargumentjenkinsunknownfatalrevisionworkingambiguousnot

Problem

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

Solution

From the git documentation around the command git rev-list:

git rev-list A...B

Try your command syntax like the above (i.e. origin/master...origin/${currentBranch})

Context

StackExchange DevOps Q#4485, answer score: 1

Revisions (0)

No revisions yet.