How to Identify the GitHub URL of a Cloned Git Repository Using Git Command?

Advertisements

I have a Git repository containing a folder with Git files, but I’m not certain if the repository was cloned from a specific URL on GitHub.

Is there a Git command that can help me identify the URL that the repository was cloned from, if any?

>Solution :

Yes, there is a Git command that can help you identify the URL that the repository was cloned from. The command is called git remote show.

Run this command:

git remote show 

This will tell you if the repository was cloned or not. If it was cloned from a URL it will show origin

Then you can see the URL by running :

git remote show origin

Leave a ReplyCancel reply