Listing remote git repo url

If you are looking for how to list remote git repository url, there are multiple ways to achieve it.

The simple and fastest way to do it is by running the command

git remote -v

from your local git repository.

It will list your remote repository like below:-

If you want more details, you may use the command

git remote show origin

to find more details about the remote.

Here origin is the remote branch name( It is most commonly used for remote default branch). The command shows details about the remote branch. You can replace it with your own remote branch name.

PS:- The git remote show origin will only work if your remote repository is accessible and is a bit slow(due to fetching details from remote). git remote -v will always work and is very fast.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *