Information Technology Reference
In-Depth Information
$ git add -A
$ git commit -m "Third revision [Stephen King]"
6. Check the status of the repository:
$ git status -s
Now, the output is empty; therefore, we know that the repository is clean.
7. Check the log with:
$ git l
The output will contain three revisions:
ffa6 Third revision [Stephen King]
0468 Second revision: [John Grisham]
de36 First commit [Agatha Christie]
8. The repository is shown in Figure 3-1 .
Note The two commands introduced in Recipe 3-1: $ git add -A and $ git
commit -m "..." save the current state of your working directory as a new revi-
sion. We used them to store one new file in every revision, but that is not necessary. You
can create, delete, move, and copy any arbitrary number of files. These two commands
store the working directory, no matter how many files were modified or which type of
tools were used.
How It Works
The new repositories are initialized with the command:
$ git init
You can pass a path to tell git where you want your project to be stored. The com-
mand:
Search WWH ::




Custom Search