Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在当前工作目录中有一个修改后的文件,名为file.txt. 我想将它与调试分支上的版本进行比较。以下命令不起作用:
file.txt
git diff file.txt debug:file.txt
致命:路径“file.txt”存在于磁盘上,但不在“调试”中
我该如何比较它们?我必须先承诺吗?
使用以下命令file.txt从当前分支到debug分支进行比较:
debug
git diff debug file.txt