查看某行代码谁写的:

git blame file_name
git blame -L 58,100 file_name  # 58~100 行代码

其输出格式为:

commit_ID | 代码提交作者 | 提交时间 | 代码位于文件中的行数 | 实际代码 

根据 commit_ID 可以查看对应的提交记录:

git show commit_ID
posted on 2022-09-27 11:17  Beautytoloveme  阅读(948)  评论(0编辑  收藏  举报