Information Technology Reference
In-Depth Information
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to
track)
The comment # Initial commit means that the repository is ready to store the
very first commit. Let's do that.
Create the first file:
$ vi agatha-christie.txt
The file can contain the text shown in Listing 3-1 , but that is not crucial.
Listing 3-1. The contents of agatha-christie.txt
Novels
1943 | Five Little Pigs
1934 | Murder on the Orient Express
After the file agatha-christie.txt is saved, check the state of the repository
with:
$ git status -s
You will see the following output:
?? agatha-christie.txt
The two question marks ?? inform you that the agatha-christie.txt file is
not tracked. It is a new file that hasn't been committed. Right now, the repository is
dirty.
Create your first revision with the following two commands:
$ git add -A
$ git commit -m "First revision [Agatha Christie]"
The file is now stored in a new revision. The command:
 
 
Search WWH ::




Custom Search