Git Internals (2/4)
We will start with an empty repository to illustrate the internal structure of a Git repository.
We create a new repository by creating a new directory called "EmptyGitRepo1" and executing
After executing the
git init command a new directory called ".git" is created. The contents of the .git
directory are shown in Figure 1.
|Figure 1: Initial contents of .git directory|
The "config" file contains repository configurations options. The initial contents of the file are shown below.
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly
The "description" file is simply a file whose contents give a description of the repository. It can be used by tools (the web interfaces for instances) to show a human-friendly description of the repository. It doesn't affect repository operations in any way. The initial contents of the file are shown below for reference.
Unnamed repository; edit this file 'description' to name the repository.
blog comments powered by Disqus