Git 日志搜索

示例

git log -S"#define SAMPLES"

搜索添加删除特定字符串或提供的REGEXP匹配的字符串。在这种情况下,我们要查找字符串的添加/删除#define SAMPLES。例如:

+#define SAMPLES  100000

要么

-#define SAMPLES  100000


git log -G"#define SAMPLES"

搜索的变化线路 含有特定字符串或字符串匹配提供REGEXP。例如:

-#define SAMPLES  100000
+#define SAMPLES  100000000