我想在重命名完成之前(当然是自动检测)看到过去重命名的文件的内容。git show file with rename detection(相当于git log --follow)
With git log --follow foo_renamed.txt
and git show master~20 foo_original_name.txt
我可以确认git能够跟踪文件重命名并且文件存在于master~20
中。然而,
git show --follow master~20:foo_renamed.txt
和
git show -M master~20:foo_renamed.txt
都失败,
致命:路径 'foo_renamed.txt' 存在于磁盘上,而不是在 '高手〜20'。
这实际上是有道理的,因为对象规范是<rev>:<path>
BLOB但没有-- /file/path
选项git show
。任何其他方式?谢谢。