Information Technology Reference
In-Depth Information
$ git add -A
$ git commit -m "...".
This operation—as realized by those two commands—is depicted in
Fig-
Figure 3-10
.
Working with $ git add -A and $ git commit -m commands
Thanks to:
$ git reset --hard [REVISION]
$ git checkout [REVISION]
you know how to retrieve one of the previous snapshots. Using
$ git checkout
or
$ git reset
you can access every revision stored in your repository. Remember
that when using
$ git reset
the reflog will help you to return to the latest revision.
From now on you should remember two new important ways to characterize a re-
pository. The repository can be:
• Clean or dirty
• In a detached HEAD or in a normal state
Both characteristics are displayed by the
$ git status -sb
command.
The
repository is clean
when the content of the working directory is identical to the
snapshot saved in the current revision.