git blame
git blame
works when providing a commit reference that contains the file. Find the most recent one with log:
$ git log -2 --oneline -- example/path/file.txt
fffffff deleting file.txt
eeeeeee Last change to file.txt before deleting.
Then blame the parent commit:
$ git blame eeeeeee -- example/path/file.txt
git gui blame
git gui blame
won't work this way, however. A work around is to browse the repository at the last commit that contained the file, then from the GUI select the file and launch the blame viewer:
$ git gui blame eeeeeee example/path/file.txt
(Note: Use log -2
and eeeeeee
instead of fffffff^
because git gui blame
can not handle fffffff^:example/path/file.txt
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…