Search a Git Repository

You can search the project’s Git repositories for a file name, directory name, or a term in the source code files, file paths, and file revisions.

The search field supports common programming languages, such as HTML, JavaScript, CSS, and Java. You can use these features while searching terms:

  • Language-aware

  • Auto-suggest

  • Symbols (class and function names) and file names

  • CamelCase

Here's how to search for a term in Git repositories:

Action How To

Search for a term in a Git repository and a revision

  1. From the Repositories drop-down list, select the Git repository. From the Revisions the Revisions icon drop-down list, select the revision.

  2. In the top-right corner of the page, in the Search Code box, enter the search term or select it from the suggestion list.

  3. Click Search the Search icon.

Search for a term in all revisions of a Git repository

  1. From the Repositories drop-down list, select the Git repository. From the Revisions Revisions drop-down list, select the revision.

  2. In the top-right corner of the page, in the Search Code box, enter the search term or select it from the suggestion list.

  3. Click Search the Search icon.

  4. In the Revisions the Revisions icon drop-down list, click Reset the Reset icon.

    The Revisions the Revisions icon drop-down list now shows All Revisions.

Search for a term in all Git repositories

  1. From the Repositories drop-down list, select the Git repository. From the Revisions Revisions drop-down list, select the revision.

  2. In the top-right corner of the page, in the Search Code box, enter the search term or select it from the suggestion list.

  3. Click Search the Search icon.

  4. From the Repositories drop-down list, select the All Repositories option, or click Reset the Reset icon.

The search result page displays all files, file paths, and file revisions that contain or match the search term (or symbol). To reset the search, to the left of the Search Code box, click Back the Back icon.