Here are the commands to check Git remote configurations:
Check Remote URLs
git remote -v
This shows all remote repositories with their fetch and push URLs.
List Remote Names
git remote
Shows just the names of your remotes (usually "origin").
Get Detailed Remote Info
git remote show origin
Shows detailed information about a specific remote including fetch/push URLs and branch tracking.
Check Remote URL for Specific Remote
git config --get remote.origin.url
Directly gets the URL for the "origin" remote.
Common Output Examples
$ git remote -v
origin https://github.com/user/repo.git (fetch)
origin https://github.com/user/repo.git (push)
If you don't see any output, it means no remote repositories are configured. You can add one with:
git remote add origin <repository-url>
Top comments (0)