源代码行的git历史记录 [英] git history of a source line

查看:108
本文介绍了源代码行的git历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究git diff和git log选项以找到一种方法来追踪回购(分支机构,作者,提交消息等)中给定的源代码行历史记录,但我没有看到像这样的东西。

是否有第三方的git工具可以完成这项工作?

解决方案

你想

  git blame 

如果代码行来自历史中某个时间点的另一个文件,并且您想跟踪该文件,您可以

  git blame -M 


I've been looking into git diff and git log options to find a way to trace a given source code line history in the repo (branches, authors, commit messages, etc.) but i don't see anything like this.

Are there third-party git tools that can accomplish this?

解决方案

you want

git blame

If the line of code came from another file at some point in history and you want to track that, you can

git blame -M

这篇关于源代码行的git历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆