Back

Explore Courses Blog Tutorials Interview Questions
+5 votes
7 views
in DevOps and Agile by (19.4k points)
edited by

I pulled a project from GitHub a few days ago. I've since discovered that there are several forks on GitHub, and I neglected to note which one I took originally. How can I determine which of those forks I pulled?

2 Answers

+5 votes
by (27.5k points)
edited by

Tip to get only the remote URL:

git config --get remote.origin.url

In order to get more details about a particular remote, use the

git remote show [remote-name] command

Here use,

git remote show origin

For more information about installation of git and common git commands please go through the following link:

 

by (140 points)
This answer appears in google search result for "git get remote url" and is wrong. You do not need to know configuration tree in order to get remote url.

'git remote show origin' seems to provide the response only when the remote is accessible and is not useful when tracing the problems with remote.

The correct way getting git remote is:
`git remote -v`
0 votes
by (140 points)

To get the remote URL:

git remote -v

Browse Categories

...