Information Technology Reference
In-Depth Information
taining all the tracked files (staged and unstaged). The untracked files (i.e., files denoted
by ?? ) are not modified by this command.
The same effect as with the $ git commit -a command can be obtained with
two commands:
$ git add -u
$ git commit -m "..."
The command $ git add -u stages all tracked files.
Remember that you cannot use one command:
$ git commit -am "..."
to commit new files. New files have to be staged with the $ git add command.
There is no other way to commit them.
The procedure described in Recipe 4-3 is presented in Figure 4-3 . As you can see
the staging area is skipped by both commands.
Figure 4-3 . The procedure of committing a modified file (the staging area is skipped)
Caution The command $ git commit -a -m "..." can be written as $
git commit -am "...". The order of options is important. You cannot write it as
$ git commit -m -a "..." or $ git commit -ma "...".
 
 
Search WWH ::




Custom Search