我想在重命名完成之前(當然是自動檢測)看到過去重命名的文件的內容。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
。任何其他方式?謝謝。