Reputation: 2141
Is there any way to list all the remote as well as local repositories of one using git shell on Windows? I normally use GitHub (the GUI version) where local and remote repositories are listed in GUI.
What I have tried is:
$ git remote -a
$ git remote -r
I have also tried to play with history command, and browsed through some tutorials, but none of them mentions a clear cut solution. Please see if you can respond.
Upvotes: 2
Views: 5907
Reputation: 27
if You are using POSIX style OS, you can run this command.
find / -name ".git"
Basically Git does not have a centeral repository that contains all the repositories. This command just search all the folders for a .git
file.
Likewise on Windows or Mac, one can search for .git
as well and it will list all the git repositories.
Upvotes: 0
Reputation: 70663
There is no central place where a list of all your repos are stored. A git repository is nothing but a folder with some fancy content. But that means that you can find all git repos by looking for exactly that.
Do a search on all your drives for .git
. If you have bare repos there, it might get a little bit more difficult. You could try looking for files that are called HEAD
, though that might give you some false positives. Maybe files named config
that contain the string repositoryformatversion
.
Upvotes: 2