-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Git
By :

In Chapter 2, Developing with Git, we learned that, besides the working directory (worktree) where you work on changes and the local repository where you store committed changes as revisions, there is also a third section between them: the staging area, sometimes called the index.
In the same chapter, we learned how to examine the status of the working directory, as well as how to view the differences. We saw how to create a new commit out of the working directory or out of the staging area.
Now, it is time to learn how to examine and modify the state of individual files.
It is easy to examine the contents of the working directory: you can just use the standard tools for viewing files (for example, an editor or pager) and examining directories (for example, a file manager or the dir
command). But how do we view the staged contents of a file or the last committed version?
One possible solution is...