2

I am trying to search for a specific file extensions across all Git remote projects for the master branch.

Is there any command for it? Cloning all projects locally will take lot of time.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Vivek Jaiswal
  • 861
  • 1
  • 7
  • 20

3 Answers3

2

In TFS 2018, I found the search by using filter by scope(file:) option. It has all the necessary filters(e.g. Branch, repo). This solved my issue. Using the same search, I able to find the string within each file.

Vivek Jaiswal
  • 861
  • 1
  • 7
  • 20
1

Unfortunately not, you have to rely on the tools provided by your host platform: Gitlab, Github or whatever.

As an alternative, you should build a list of your remote repo then remotely search by:

git log origin/master ...search options...
Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
0

Both GitHub and GitLab have search functionality for this.

If you need a local/git based solution, cloning the repo is probably your best bet, depending on what information you need from the repository contents. There is a tool called all-repos that helps you do this. It provides a minimal configuration for discovery and automation of working with many repos all at once. It also includes tools like all-repos-find-files, all-repos-grep, etc.

sytech
  • 29,298
  • 3
  • 45
  • 86