Information Technology Reference
In-Depth Information
Enter the directory git-recipes/ :
$ cd git-recipes
Second, you then execute the command:
$ cp -R git-recipes/02-03 git-recipes/02-04
The command will create the exact copy of files from git-recipes/02-03/ .
The content of git-recipes/02-04/ is a valid git repository.
How It Works
By using the cp -R command, you can recursively copy a directory. If used on a dir-
ectory containing a repository it will create a correct repository that is almost identical
with a repository created with git clone command. We will explore the difference
between repositories created in Recipes 2-3 and 2-4 in Recipe 2-5.
Hint Once you know that a repository can be copied with standard filesystem opera-
tions such as cp , you can use rsync or scp to achieve the same result. In chapter 11
we will use scp command to start a new project.
2-5. Exploring the contents of a git repos-
itory
Problem
What does the directory created by the git clone command contain? To answer this
question you will need to explore the contents of git-recipes/02-03/ directory
with cd , ls , and cat commands. You also can use your favorite file manager.
Solution
Search WWH ::




Custom Search