我正在我的生产代码中运行git fetch origin,然后尝试使用origin/master与我的当前分支进行Git差异比较。 在运行命令时,我遇到了以下错误:
尝试的命令:
我们如何纠正Git diff命令的问题?
请查看下面的命令和实际错误。fatal: ambiguous argument unknown revision or path not in working tree
尝试的命令:
git fetch origin
git diff --name only release/test origin/master
预期输出:
git diff should work
实际输出:
[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>...]'
我们如何纠正Git diff命令的问题?
--
(git diff --name-only release/test origin/master --
),会发生什么? - Ambergit fetch release
会发生什么?如果可以的话,再试一下diff
? - Amber--name only
- Matthias