How can I find out which URL a local Git repository was originally cloned from?
By default, a cloned Git repository has a remote named
origin, which refers to the remote repository from which it was cloned. To obtain the URL of this remote, we can use the following command:
git ls-remote --get-url origin
To obtain more information about the remote repository, such as its branches, we can run the following command:
git remote show origin
Note that this second command requires the remote repository to be reachable over the network but the first command does not.
If our remote is not called
origin, we can retrieve the URLs of all remotes using the following command:
git remote -v
As remotes can be added, removed, or modified at any time, there is a chance that the remotes in your local repository may not include the remote from which it was originally cloned.
Loved by over 4 million developers and more than 90,000 organizations worldwide, Sentry provides code-level observability to many of the world’s best-known companies like Disney, Peloton, Cloudflare, Eventbrite, Slack, Supercell, and Rockstar Games. Each month we process billions of exceptions from the most popular products on the internet.
Here’s a quick look at how Sentry handles your personal information (PII).×
We collect PII about people browsing our website, users of the Sentry service, prospective customers, and people who otherwise interact with us.
What if my PII is included in data sent to Sentry by a Sentry customer (e.g., someone using Sentry to monitor their app)? In this case you have to contact the Sentry customer (e.g., the maker of the app). We do not control the data that is sent to us through the Sentry service for the purposes of application monitoring.Am I included?
We may disclose your PII to the following type of recipients:
You may have the following rights related to your PII: