1

Is there a way to search for old code in Tortoise Git? For example, let's say I want to look at an old commit with some old code (that has since been changed), but I'm not sure which file it's in, and it's such a large project that manually scrolling through the commits is super tedious. Is there a way that I can enter in some key words and Tortoise Git will search through all files and across all commits for those key words?

Thanks!

Update: The closest I can get is to right-click > Git History and then do a search there for the key words, but that will only search one commit at a time, so you have to scroll from commit to commit until you see your keywords highlighted in yellow. Better than nothing I suppose, but still tedious. I'm hoping there's a way to search key words across all commits that someone might know of.

dvd7e
  • 11
  • 3

1 Answers1

0

You need to use git bisect. Its exactly what bisect is for. Finding old code without knowing where or when it was created/modified.

How to use git bisect?

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • I wasn't previously aware of git bisect so thank you for bringing that up, although I don't think it solves my original problem. I may not be searching for a bug that breaks my code...I'm looking for some code and/or comments that ran fine and has since been changed, but I want to now reference it. But I can't easily find it among many files and many commits. – dvd7e Apr 24 '15 at 15:53
  • This is why you are using bisect. run a scrip to find the code you need – CodeWizard Dec 30 '15 at 15:23