gitvisual-studio-codevscode-extensions

vscode search for a text only in git changes


Before to publish branch sometimes I want to search for a specific keyword to ensure I have fixed it correctly everywhere. The problem is, I want to search it only in changes not for a whole project.

Is it possible?


Solution

  • As AsGoodAsItGets pointed out in one of the comments there is a feature request pending on VS Code github which will allow us to do that.

    In the meantime I have a workaround:

    1. Close all open files
    2. Open Source Control

    enter image description here

    1. Right click on Changes and choose Open changed files. Note that it will open also deleted files.

    enter image description here

    1. Go to Search and select Search only in Open Editors

    enter image description here

    Not ideal, but that's how I search for my console.log leftovers ;)