归咎于不同位置的早期版本的文件

时间:2011-09-28 17:37:45

标签: git blame

有一次,我的git存储库重新组织了它的路径。

我常常想在行动之前对修订版的文件负责。

git责备咒语归咎于当前存储库中不存在的文件是什么?

我试过了:

> git blame new/path/to/file old_rev
fatal: no such path ... in old_rev

> git blame old/path/to/file old_rev
fatal: cannot stat path ... in old_rev

> git blame old_rev:old/path/to/file old_rev
fatal: cannot stat path ... in old_rev

显然我可以查看old_rev并指责相应的路径,但我宁愿避免这种情况。

1 个答案:

答案 0 :(得分:22)

您可以使用git blame --follow来指责您的重命名。

我也看到你的参数顺序错误,请尝试以下方法:

git blame old_rev -- old/path/to/file
相关问题