git blame
可用於找出哪個提交已修改,但我遇到了一種情況,看起來整個文件是從我不知道的地方複製過來的。如何找出一行代碼的更改歷史記錄
$ git blame a.c
c59f772b ([email protected] 2011-08-25 01:07:44 +0000 1) #include <stdio.h>
c59f772b ([email protected] 2011-08-25 01:07:44 +0000 2)
c59f772b ([email protected] 2011-08-25 01:07:44 +0000 3) int main(int argc, char **argv) {
c59f772b ([email protected] 2011-08-25 01:07:44 +0000 4) void *handle;
c59f772b ([email protected] 2011-08-25 01:07:44 +0000 5) double (*cosine)(double);
...
$ git log c59f772b
commit c59f772bc273e65985236ba665f7a88492a33235
Author: [email protected]
Date: Thu Aug 25 01:07:44 2011 +0000
Cloning a bunch of stuff from the another repository
No changes, as is.
此提交只是關於複製代碼。我仍然不知道是哪個人和誰寫了這段代碼。
我可以列出更改歷史記錄的代碼或類似的東西嗎?