Information Technology Reference
In-Depth Information
• After the
$ git prune
command, all ureachable revisions are removed
from the database. They are lost. There is no way to get them back.
Solution
Create a new repository:
$ cd git-recipes
$ git init 03-12
$ cd 03-12
Create three revisions with the comments
a
,
b
,
c
:
$ git simple-commit a b c
You can achieve the same effect without aliases using the commands show in
List-
Listing 3-14.
The commands equivalent to git simple-commit a b c
$ echo a>a.txt
$ git add -A
$ git commit -m a
$ echo b>b.txt
$ git add -A
$ git commit -m b
$ echo c>c.txt
$ git add -A
$ git commit -m c
Print the history with
$ git l
. The output contains three revisions:
5c1e c
4580 b
c4ac a