October 2016
Beginner
861 pages
20h 37m
English
Sometimes it is not enough; by just looking through the commit messages in the history, you may want to know which commits touched a specific method or variable. This is also possible using git log. You can perform a search for a string, for example, a variable or method, and git log will give you the commits, adding or deleting the string from the history. In this way, you can easily get the full commit context for the piece of code.
Again, we will use the JGit repository with the master branch pointing to b14a939:
$ git checkout master && git reset --hard b14a939
We would like to find all the commits that have changes made to lines that contain the method "isOutdated". Again, we will ...