6

I have cloned the git repo from my servers to different folders. Now I am confused from where I had cloned few specific repositories from. How can I know the location I cloned the git projects from?

shx2
  • 61,779
  • 13
  • 130
  • 153
Sajeev
  • 783
  • 3
  • 14
  • 46
  • 2
    Try `git remote -v` and you'll probably see an 'origin' repository. –  Aug 12 '16 at 12:35

4 Answers4

6

Using:

git remote show origin

or:

git config --get remote.origin.url
shx2
  • 61,779
  • 13
  • 130
  • 153
4

Do use...

git remote -v

That should do the trick

rnrneverdies
  • 15,243
  • 9
  • 65
  • 95
3

When you git clone a repository, Git automatically adds a remote named origin which refers to the place from which you cloned the repository.

git remote -v

will show you all of your remotes and their URLs.

If you have removed this remote, then you cannot tell from where the repo was cloned.

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
0

You do:

vim REPO/.git/config

Or:

git remote show origin

Or:

git remote -v
CMPS
  • 7,733
  • 4
  • 28
  • 53