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 に答える