Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to list up git repositories in terminal?

Tags:

git

terminal

I have several git repositories on my system and I want to list them all in terminal.

What I'm looking for is something like this:

/path/to/my/git/repo/1/ REPONAME1  
/path/to/my/git/repo/2/ REPONAME2  
/path/to/my/git/repo/3/ REPONAME3

If you can come up with how to show branch name and repo's status eg. [master] c:0 u:1 d:0, that would be great.

like image 660
studiomohawk Avatar asked Feb 24 '11 07:02

studiomohawk


People also ask

How do I see all my git repositories?

You can find the list of all local git repositories by navigating from “Git > Local Repositories.” Based on the previously configured folder for the local repos, Visual Studio will change the context for the local repositories. Then, you will have all the local repos on your fingertip.

How do I list a git repository?

You can list the remote branches associated with a repository using the git branch -r, the git branch -a command or the git remote show command. To see local branches, use the git branch command. The git branch command lets you see a list of all the branches stored in your local version of a repository.

How do I list all repositories in GitHub?

How To List All Public Repositories Belonging to a User? So, to list all public repos from a user, send a GET request to https://api.github.com/users/<USER-NAME>/repos , replacing with the actual user from whom you want to retrieve the repositories.

How do I find my git repository terminal?

You can inspect a Git repository by using the git status command. This command allows you to see which changes have been staged, which haven't, and which files aren't being tracked by Git. You should try and remember that status output does not show you any information regarding the committed project history.


1 Answers

To list all the git repositories you have on your system you can run the following command in a bash shell terminal (at the command line) and find them.

find / -name .git -type d -exec dirname {} \;
like image 90
Adrian Pillinger Avatar answered Sep 18 '22 15:09

Adrian Pillinger