gitgit-clonegit-remote

Difference between git remote add and git clone


What does the clone command do? Is there any equivalent to it in svn?

What is the difference between

git remote add test git://github.com/user/test.git

And

git clone git://github.com/user/test.git

Does the name of the created repo matter?


Solution

  • git remote add just creates an entry in your git config that specifies a name for a particular URL. You must have an existing git repo to use this.

    git clone creates a new git repository by copying an existing one located at the URI you specify.