[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gits] Finding info in git history

My favorite version is the ?git pickaxe?:

Basically, you just add ?-Sfoo? to your ?git log? command line, and you a list of only changes that involved the string ?foo? (which can actually be a full regular expression if you want, though I rarely use it that way.)

(This is the second answer on the stackoverflow thread that Eric pointed to, but I find it to be a lot easier to use than the first answer on the thread.)

On Feb 13, 2014, at 11:31 AM, Eric Eide <eeide at cs.utah.edu> wrote:

> 	Dan> I appear to have removed string/code sometime in the history of my
> 	Dan> project.  I would like to find the file(s) that had this
> 	Dan> string/code and the commit  where it was removed.
> Perhaps the recipe described here:
> http://stackoverflow.com/questions/2928584/how-to-grep-search-committed-code-in-the-git-history
> -- 
> -------------------------------------------------------------------------------
> Eric Eide <eeide at cs.utah.edu>  .         University of Utah School of Computing
> http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX