Information Technology Reference
In-Depth Information
$ rm -rf .git
After this command you will lose the entire history of your project. The project's
directory will contain only the latest version of the files stored in the working directory.
Summary
In this chapter, we've discussed the basic abilities to work with git repositories. You
now know how to:
• Clone a repository (both: remote and local).
• Enter the repository and issue various git commands.
• Print the list or revisions stored in the repository.
• Analyze the history with git log and gitk.
• Discover the list andthe number ofrevisions, contributors, andfiles stored
in the repository.
• Define aliases for the most frequently used commands.
You also have learned the role of
• The git directory
• The git database
• The working directory
All of which will be needed to understand the later chapters.
The git directory is a special directory named .git , which usually is stored inside
your project's directory. It contains all the history of your project and various configur-
ation entries necessary for git to operate. Do not modify the contents of the .git dir-
ectory unless you are strictly instructed to do so.
Inside the git directory there is a special subdirectory named .git/objects . It is
the git database , which is also called the object store . That is where various git's com-
mands store data. Revisions, different versions of files, directories, their contents, and
so forth—they are all stored in this database. From time to time git tries to optimize
this database. If you use git improperly, this can cause data loss.
Search WWH ::




Custom Search