Home > Back-end >  File search across all Git projects
File search across all Git projects

Time:08-11

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.

CodePudding user response:

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...

CodePudding user response:

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.

  • Related