Information Technology Reference
In-Depth Information
Figure 3-9 . The repository that is discussed in Recipe 3-8
Hint The content of the files shown in Figure 3-9 is not important.
Solution
Initialize a new repository:
$ cd git-recipes
$ git init 03-08
$ cd 03-08
Create the first file with:
$ echo lorem > lorem.txt
This command creates a new file named lorem.txt . The file contains a single
word lorem . You can verify it with two commands:
$ ls
$ cat lorem.txt
The first file lists the contents of the current directory (the list will consist of a
single file lorem.txt ) and the second displays the contents of lorem.txt (it will
be lorem , of course).
Now create the first revision with:
$ git snapshot lorem
Of course, the repository is clean, and the $ git status -s returns empty res-
ults. Now check the reflog with:
$ git reflog
The output of this command is shown in Listing 3-8 .
 
Search WWH ::




Custom Search