问题
我正在尝试查看位于分支中的文件的内容,wip
如下所示:
git show wip:local-config.php
但是,我收到以下错误:
fatal: Path 'local-config.php' exists on disk, but not in 'wip'.
我试过的
我尝试更正路径但失败了:
git show wip:./local-config.php
我没有使用另一个分支,而是尝试引用来自同一分支的先前提交,如下所示:
git show cd14704:local-config.php
这给出了这个错误:
fatal: Path 'local-config.php' exists on disk, but not in 'cd14704'.
最后,当我尝试显示电流时,local-config.php
我根本没有输出:
git show local-config.php
文档
根据手册,这是可能的:https ://www.kernel.org/pub/software/scm/git/docs/git-show.html 。我究竟做错了什么?