Information Technology Reference
In-Depth Information
There isn't any difference between git-recipes/02-03/ and git-re-
cipes/02-04/ . Later, in chapter 10 , we will learn to change [remote "ori-
gin"] entries in the config file using the git remote command.
Conclusion
As a conclusion to Recipes 2-4 and 2-5, remember that repositories can be copied and
moved to different locations on your drive; just as any other directory. The git directory
.git doesn't contain any information that ties the repository to a specific path on your
drive.
2-6. Deleting and restoring the contents
of the working directory
Problem
You want to verify that git has stored all your files in the database .git/objects .
To achieve this you need to delete the contents of the working directory and then re-
store it from the git database.
Solution
Enter the repository created in Recipe 2-3:
$ cd git-recipes/02-03
Remove all files and directories, except the .git subdirectory:
$ ls -la
$ rm -rf *
$ rm .????*
Now, the directory git-recipes/02-03/ contains only one subdirectory
.git . You can check it with:
Search WWH ::




Custom Search