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?
git pull is a (clone(download) + merge) operation and mostly used when you are working as teamwork. In other words, when you want the recent changes in that project, you can pull. The clone will setup additional remote-tracking branches.
The git remote add command will create a new connection record to a remote repository. After adding a remote, you'll be able to use as a convenient shortcut for in other Git commands. For more information on the accepted URL syntax, view the "Repository URLs" section below.
When you download the repo it just gives you all the source files with no . git so you dont have the repo. When you clone you get a copy of the history and it is a functional git repo.
The Git clone command will create a new local directory for the repository, copy all the contents of the specified repository, create the remote tracked branches, and checkout an initial branch locally. By default, Git clone will create a reference to the remote repository called origin .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With