in Technology by
How to determine the URL that a local Git repository was originally cloned from?

1 Answer

0 votes
by

If you want only the remote URL, or if your are not connected to a network that can reach the remote repo:

git config --get remote.origin.url

If you require full output and you are on a network that can reach the remote repo where the origin resides :

git remote show origin

When using git clone (from GitHub, or any source repository for that matter) the default name for the source of the clone is "origin". Using git remote show will display the information about this remote name. The first few lines should show:

C:\Users\jaredpar\VsVim> git remote show origin
* remote origin
  Fetch URL: [email protected]:jaredpar/VsVim.git
  Push  URL: [email protected]:jaredpar/VsVim.git
  HEAD branch: master
  Remote branches:

Related questions

0 votes
    I pulled a project from GitHub a few days ago. I've since discovered that there are several forks on GitHub, ... those forks I pulled? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    How do you push a file from your local system to the GitHub repository using Git?...
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    Explain How to change the URI (URL) for a remote Git repository?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    How to push a new local branch to a remote Git repository and track it too?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    Tor was originally designed for the _____________ for protecting government communications. (a) U.S. Navy (b) ... -Cyber Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Oct 31, 2021 in Education by JackTerrance
0 votes
    What is the git command that downloads any repository from GitHub to your computer?...
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?...
asked Jan 15, 2021 in Technology by JackTerrance
0 votes
    How is a bare repository different from the standard way of initializing a Git repository?...
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    Name any one command that you can execute when it comes to viewing the exact difference between the repository and the local version?...
asked Feb 17, 2021 in Technology by JackTerrance
0 votes
    How to remove local (untracked) files from the current Git working tree?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    How will you remove a file from Git without actually removing it from your local filesystem?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    How to Reset local repository branch to be just like remote repository HEAD?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    How do you delete untracked local files from your current working tree? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    How to make Git “forget” about a file that was tracked but is now in .gitignore?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    How to make Git “forget” about a file that was tracked but is now in .gitignore?...
asked Jan 7, 2021 in Technology by JackTerrance
...