DEV Community

Cover image for How to see remote url in git
Adrian Matei for Codever

Posted on • Edited on • Originally published at codever.dev

3

How to see remote url in git

The simplest way:

git remote -v

# result similar to the following
origin  git@github.com:codeverland/codever.git (fetch)
origin  git@github.com:codeverland/codever.git (push)
Enter fullscreen mode Exit fullscreen mode

To get only the remote URL:

git config --get remote.origin.url

# result similar to the following
git@github.com:codeverland/codever.git
Enter fullscreen mode Exit fullscreen mode

In order to get more details about a particular remote, use the git remote show [remote-name] command

git remote show origin # here "origin" is the remote name

# result similar to the following
* remote origin
  Fetch URL: git@github.com:codeverland/codever.git
  Push  URL: git@github.com:codeverland/codever.git
  HEAD branch: master
  Remote branches:
    dependabot/npm_and_yarn/backend/aws-sdk-2.814.0  new (next fetch will store in remotes/origin)
    dependabot/npm_and_yarn/backend/nth-check-2.0.1  new (next fetch will store in remotes/origin)
    dependabot/npm_and_yarn/backend/path-parse-1.0.7 new (next fetch will store in remotes/origin)
    dependabot/npm_and_yarn/path-parse-1.0.7         new (next fetch will store in remotes/origin)
    docs/add-links-to-vscode                         tracked
    feat/add-last-searches-to-side-menu              tracked
    feat/add-welcome-info                            tracked
    feat/migrate-to-codever                          tracked
    master                                           tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local refs configured for 'git push':
    docs/add-links-to-vscode            pushes to docs/add-links-to-vscode            (local out of date)
    feat/add-last-searches-to-side-menu pushes to feat/add-last-searches-to-side-menu (local out of date)
    feat/add-welcome-info               pushes to feat/add-welcome-info               (local out of date)
    feat/migrate-to-codever             pushes to feat/migrate-to-codever             (local out of date)
    master                              pushes to master                              (up to date)

Enter fullscreen mode Exit fullscreen mode

Shared with ❤️ from Codever. 👉 use the copy to mine functionality to add it to your personal snippets collection.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Detect & resolve downtimes before users even know

Trusted by Vercel, Render, LinkedIn, and thousands of teams, Checkly monitors your website or application, sends real-time alerts during downtimes, and speeds up recovery with full-stack tracing.

Start Monitoring

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay