开发者

Check first show up of code block in GIT

开发者 https://www.devze.com 2023-02-02 19:26 出处:网络
I would like to add @since params to开发者_运维技巧 my docblocks of class methods, how I can easily find first commit that have introduced that given method in class (not last modified like with git b

I would like to add @since params to开发者_运维技巧 my docblocks of class methods, how I can easily find first commit that have introduced that given method in class (not last modified like with git blame ) ?


Try git log -S'line of code here'

You can enter multiple lines of code between the quotes if you wish, and customise log output in all the usual ways (--oneline, -p etc.), and the command will also work with git diff and git format-patch.

0

精彩评论

暂无评论...
验证码 换一张
取 消