zl程序教程

您现在的位置是:首页 >  其他

当前栏目

如何搜索 git 提交记录

搜索Git 如何 记录 提交
2023-09-11 14:17:02 时间

如何搜索 git 提交记录

# 1
git grep <regexp> $(git rev-list --all)

# 2
git log -p --all -G '可通过正则搜索' --pretty=format:'%ci' # 可跨分支搜索 # -S '通过文本搜索'
git branch -a --contains 8beeff00d # 根据 commit 记录获取分析