Information Technology Reference
In-Depth Information
$ ls -l
Next, execute the command:
$ git reset --hard
All the files will be restored. The command:
$ ls -l
now prints the result that is identical with those in Figure 2-4 .
How It Works
Usually, the directory containing the git repository consists of two areas. One has
already been discussed, the git directory named .git . The other is called the work-
ing directory . They are both shown in Figure 2-7 .
Figure 2-7 . The git directory and the working directory
The working directory is the temporary storage that contains your work. The git dir-
ectory, on the other hand, contains the database that stores all snapshots of your project.
Recipe 2-6 should convince you that the contents of your working directory can be eas-
ily restored from the database.
 
 
Search WWH ::




Custom Search