Information Technology Reference
In-Depth Information
The repository is dirty when the content of the working directory contains uncom-
mitted changes.
The second characterization, normal state and detached HEAD state, is done on the
basis of a .git/HEAD file. We will return to this in the chapter about branches. Cur-
rently you know how to check states. The repository is in a detached HEAD state
when the command:
$ git status -sb
begins with:
## HEAD (no branch)
Otherwise the repository is in normal state .
Another important characterization that appeared in this chapter divided the contents
of the database into:
Reachable objects : the objects available through symbolic references
Unreachable objects : the objects available through SHA-1 names only
Remember, that unreachable objects can be removed from the repository during
automatic garbage collection process. This is why you cannot work in a detached
HEAD state. When you work in a detached HEAD state you create revisions that are
unreachable unless you create a symbolic reference (a branch or a tag) manually.
Search WWH ::




Custom Search