How to get the git repository that I cloned before?

After cloning a git repository, How can I get the repository file?

for example)

After “git clone”

I want to know the URL(

how can I do this?

  • Download Submodules on
  • Setting up Git on EC2 to pull from GitHub repo
  • Jenkins not playing nice with a private GitHub repository (Windows)
  • Deploying to web server & github with one command
  • Composer install \ update authentication errors
  • Reset all branches of a local repo to be the same as remote
  • Ignore git directory
  • Error installing Git-Flow in bash for GitHub for Windows
  • 2 Solutions collect form web for “How to get the git repository that I cloned before?”

    You can use remote show, although it’s gonna ask your key:

    git remote show origin | grep 'Fetch URL'

    If you look in .git/config there should be a block similar to the following:

    [remote "origin"]
        fetch = ...
        url = <this is the url you want>

    You can get this from the command line using

    git config --get remote.origin.url

    Hope that gets what you want.

    Git Baby is a git and github fan, let's start git clone.