Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of remotes for a Git repository?

Tags:

git

I have a Git repository. This repository has multiple remote repositories (I think). How can I get a list of the remote repositories that belong to said repository?

Like git list --remotes or something like that?

like image 762
priestc Avatar asked Apr 17 '12 00:04

priestc


People also ask

What are the remotes in git?

A remote in Git is a common repository that all team members use to exchange their changes. In most cases, such a remote repository is stored on a code hosting service like GitHub or on an internal server. In contrast to a local repository, a remote typically does not provide a file tree of the project's current state.

How do I check remote repositories?

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.

What is a command to list remotely connected repositories?

You can request a list of all remote repositories that are currently connected to your local repository: $ git remote -v origin https://[email protected]/test/example.git (fetch) origin https://[email protected]/test/example.git (push)


1 Answers

You can get a list of any configured remote URLs with the command git remote -v.

This will give you something like the following:

base    /home/***/htdocs/base (fetch) base    /home/***/htdocs/base (push) origin  [email protected]:*** (fetch) origin  [email protected]:*** (push) 
like image 194
Matthew Scharley Avatar answered Oct 15 '22 11:10

Matthew Scharley