Information Technology Reference
In-Depth Information
be committed)
# (use "git checkout -- <file>..." to discard
changes in working directory)
#
#
modified:
modified.txt
#
no changes added to commit (use "git add" and/or
"git commit -a")
tells you that
modified.txt
file was modified but was not staged for
commit. Notice that as in Recipe 4-1, the file is listed under
changes not
staged for commit
.
3. Check the simplified form of status. The output of
$ git status -s
will be:
_M modified.txt
The state is indicated by two characters: a space and the letter
M
. Again, I
used the underscore instead of a space.
4. Add
modified.txt
to the staging area with
$ git add modi-
fied.txt
5. Check the status with the
$ git status
command. The output:
# On branch master
# Changes to be committed:
#
(use "git reset HEAD <file>..." to unstage)
#
#
modified:
modified.txt
#
The file is now listed as
Changes to be committed
.
6. Check the simplified form of status with the
$ git status -s
com-
mand. The output will be:
M_ modified.txt
The state is denoted by two characters: the letter
M
and a space.