Git (Version Control) - View the shorthand name of a repository

This assumes you are already cloned a repository from the source Git repo (typically called "origin") to a directory on your PC, such as the foo.git or bar.git repos.


The git remote command can be used to view the shorthand name of the repository that you have cloned.

git remote


Typically, the shorthand name of the source Git repository is "origin".



The -v or --verbose flag can be used to include the full URL to the remote Git repository.

git remote --verbose


Which will return something like this.

origin  ssh:// (fetch)
origin  ssh:// (push)


The git remote show command will display even more details.

git remote show origin


Like this.

* remote origin
  Fetch URL: ssh://
  Push  URL: ssh://
  HEAD branch: master
  Remote branches:
    develop tracked
    master  tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (local out of date)


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 25096 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |