Information Technology Reference
In-Depth Information
snapshot stored in its latest revision. If, on the other hand, the files in the working dir-
ectory were modified and not committed, we call that repository dirty . To find out
whether a repository is clean or dirty, we use the $ git status command.
3-1. Creating your first repository
Problem
You want to start a new project that will consist of text files with lists of topics written
by your favorite writers. Let's assume that you plan to store the works of every writer
in a separate file. Once you create a file and type its contents, you should save the file
and commit it into the repository. Suppose that you create files with the works of
Agatha Christie, John Grisham, and Stephen King. The history of your repository
would look similar to Figure 3-1 .
Figure 3-1 . The repository from Recipe 3-1
Solution
In this recipe you will create your first revisions with the git commit command. Git
doesn't allow committing unless you store your identity in a configuration file. If you
 
 
Search WWH ::




Custom Search