Join my Laravel for REST API's course on Udemy 👀

List all remotes in a git repository

April 24, 2021  ‐ 1 min read

You may have multiple git remotes configured for you repository. Like me in my forked Django repository on GitHub, where I have set the original Django repository as a second remote. You can easily list git remotes on the command line with the git remote command. This command just shows the local names of the remote repositories. As you can see in the following example:

$ git remote

You can get more information out of the command. By adding -v you get information about the remote urls as well, -v being short for --verbose. The following lists git remotes with urls:

$ git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)