List of remotes for a Git repository?

Question

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?

Answer

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  git@bitbucket.org:*** (fetch)
origin  [email protected]:*** (push)

You have not concluded your merge (MERGE_HEAD exists)

How do I delete a file from a Git repository?