22

在某一时刻,我的 git 存储库重新组织了它的路径。

我经常想在搬家之前对文件进行修订。

什么是 git blame 咒语来指责当前存储库中不存在的文件?

我试过:

> 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 并指责适当的路径,但我宁愿避免这种情况。

4

1 回答 1

24

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

我还看到您的参数顺序错误,请尝试以下操作:

git blame old_rev -- old/path/to/file
于 2011-09-28T17:57:27.847 回答