37. Cloning repositories
- To learn how to make copies of the repositories.
If you are working in a team, the following 12 chapters are quite important to understand because you almost always have to work with cloned repositories.
01 Go to your working directory
Go to the working directory and clone your hello repository.
cd .. pwd ls
NOTE: Now we are in the work directory.
$ cd .. $ pwd /Users/alex/Documents/Presentations/githowto/auto $ ls hello
At this point you should be in your “working” directory. It should contain a single repository named “hello”.
02 Create a clone of the hello repository
Let’s create a clone of the repository.
git clone hello cloned_hello ls
$ git clone hello cloned_hello Cloning into cloned_hello... done. $ ls cloned_hello hello
Right now there should now be two repos in your working directory: the original “hello” repo and the cloned repository named “cloned_hello”.