First, see who wrote the line of code, and in which commit:
git blame file_namegit blame-l 58,100 Keyboardactivity.java
Its display format is:
Commit ID | Code Submission Author | Submission Time | Number of lines in the file that the code is in | Actual code
This is similar to the following:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8C/24/wKioL1hjeVeyc1XSAAIDgRtPpIE882.png "style=" width : 600px;height:476px; "title=" Qq20161228163503.png "width=" "height=" 476 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1hjeveyc1xsaaidgrtppie882.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8C/27/wKiom1hjeVjgkQEtAAG4aBbOlj8056.png "style=" width : 600px;height:305px; "title=" Qq20161228163402.png "width=" "height=" 305 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1hjevjgkqetaag4abbolj8056.png "/>
So we can know the commit ID and then use the command: Git show Commitid to see ~
This article is from the "Liangxiao Technology Center" blog, please be sure to keep this source http://liangxiao.blog.51cto.com/3626612/1886961
Git tips: git blame && git show to see the revision history of a line of code