I have an unused variable in my code, and I wonder how things got to be this way. Can I use git grep (or something else) to find out easily?
Asked
Active
Viewed 34 times
1 Answers
2
git log -Svarname
where varname
is the name your variable.
See https://git-scm.com/docs/git-log#git-log--Sltstringgt:
Look for differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file.

phd
- 82,685
- 13
- 120
- 165
-
That was way easier than I had any right to expect. Thank you. – Mark VY Jan 12 '18 at 21:38