I am running git fetch origin in my production code and then am trying to a Git diff with my current branch with origin/master. I am facing this error while running the command:
fatal: ambiguous argument unknown revision or path not in working tree
Please find below the command used and the actual error.
Command tried:
git fetch origin
git diff --name only release/test origin/master
Expected output:
git diff should work
Actual output:
[localhost] local: git diff --name-only release/test origin/master | ambiguous argument 'release/test': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
How can we correct the issue with my Git diff command?