Git - Clone
Table of Contents
1 - About
The command is “clone” and not “checkout” ( instead of getting just a working copy, Git receives a full copy of nearly all data that the server has.)
After a first clone of a repository, all files will be tracked and unmodified because they are just checked out and they haven’t been edited.
2 - Articles Related
3 - Command
Clone an existing Git repository from another server.
git clone [option] [url] [directory]
We can also use the following protocol in place of https:
4 - Functionality
Git’s clone command automatically:
5 - Example
- creates a directory named “directoryWhereIwantMyCheckoutData” (The default name is the name of the git file in the URL) ,
- get the clone URL from the Web
git clone https://github.com/gerardnico/the-name-of-my-repository.git directoryWhereIwantMyCheckoutData
Cloning into 'directoryWhereIwantMyCheckoutData'... remote: Counting objects: 77, done. remote: Total 77 (delta 0), reused 0 (delta 0), pack-reused 77 Unpacking objects: 100% (77/77), done. Checking connectivity... done.