How to search for a string in old git changes in VSCode?

Viewed 1049

I'm working on a branch rewriting some code in VSCode. (I have the plugin GitLens installed.) I'm rewriting this one function - let's call it foo - and I'm trying to understand where it has been used before.

Is there a way to search for something in the modified / deleted changes in Git using VSCode? I mean like pressing cmd + shift + f and then typing the word so you get highlights in all current git changes?

1 Answers

In gitlens left bottom you can see "SEARCH COMMITS" there you can seearch in change or commit messages

SEARCH COMMITS

here is example result when I search class in mvn project

search class keyword

When I search a function name it also finds

Search function name

Related