How to get the git repository that I cloned before?

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

for example)

  • Way to search source in Gitolite repos?
  • Git Push failing: refusing to update checked out branch
  • How do I modify cygwin's PS1 for git bash completion?
  • Ensure coding-style during a git commit
  • Git revert does not work as expected
  • How to override command executor to a new version of Git under ~/bin my own against the old /usr/bin/git
  • After “git clone”

    I want to know the URL(

    how can I do this?

  • `git -S -m commit` failing to ask for password — Signing after moving from GPG mac to GPG shell
  • Local override for {gem} at /path/to/local/git/repo is using branch develop but Gemfile specifies develop
  • How to get git to use an ssh (rsh) transport other than “ssh”
  • How to undo a git push on the wrong branch
  • Remove commits which aren't in subtree nor in original repository
  • Cloning a Git repo into a new repo - without commit history
  • 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.