0

Hi I am trying to clone git repository to my local machine. What I have is only git repository on other machine. Is there any command to get url from local repository?

I just have /some/path/on/host1 which contains following directories/files

branches  config  description  HEAD  hooks  index  info  logs  objects  packed-refs  refs

I need to have the same thing on other linux machine. This is the first time I am using git.

when I cd to /some/path/on/host1 path and run

git remote show /some/path/on/host1

I have following output

* remote /some/path/on/host1                                               
 Fetch URL: /some/path/on/host1                                           
 Push  URL: /some/path/on/host1                                           
 HEAD branch: master                                                            
 Local refs configured for 'git push':                                          
   V16_3X  pushes to V16_3X  (up to date)                                       
   build64 pushes to build64 (up to date)                                       
   master  pushes to master  (up to date)                        
Gayane
  • 627
  • 1
  • 11
  • 23

1 Answers1

0

Try this

git remote -vv

or

git remote show
Ivan
  • 3,084
  • 4
  • 21
  • 22
  • I have already, but this commands don't give any output at all – Gayane Nov 01 '16 at 12:44
  • It looks like no remote was defined for this repository. May be it was just created in the folder (using 'git init') and it was not cloned from any remote repository. Do you have any git server in your organization? – Ivan Nov 01 '16 at 13:26
  • I do not know yet – Gayane Nov 01 '16 at 13:39
  • The most correct way is push existing repository to central git server and clone it from git server in any place. You can just copy this folder to your computer, but you will have no relations between repositories. Another option is clone using ssh: ssh://[user@]host.xz[:port]/path/to/repo/ – Ivan Nov 01 '16 at 13:44
  • Also you can just copy this folder to your computer, but you will have no relations between repositories. Another option is clone using ssh: ssh://[user@]host.xz[:port]/path/to/repo/ – Ivan Nov 01 '16 at 13:50