Is there a command that would allow me to check if the string "xyz" was ever in file foo.c in the repository and print which revisions they were found in?
From stackoverflow
Readonly
-
This will print any commits where the diff contains xyz
git log -Sxyz foo.c
From CaptainPicard -
I know you can do this with
gitk
, you can search for commits "adding/removing string" and give it some text to look for. There's a way to do this from the command line too, but I don't recall off the top of my head.From Greg Hewgill
0 comments:
Post a Comment