4

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
  • 57,957
  • 11
  • 121
  • 147
Sajeev
  • 765
  • 2
  • 11
  • 42
  • 2
    Try `git remote -v` and you'll probably see an 'origin' repository. –  Aug 12 '16 at 12:35

4 Answers4

4

Using:

git remote show origin

or:

git config --get remote.origin.url
shx2
  • 57,957
  • 11
  • 121
  • 147
3

Do use...

git remote -v

That should do the trick

rnrneverdies
  • 14,415
  • 9
  • 60
  • 92
2

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
  • 124,861
  • 31
  • 240
  • 314
0

You do:

vim REPO/.git/config

Or:

git remote show origin

Or:

git remote -v
CMPS
  • 7,633
  • 4
  • 27
  • 49