Information Technology Reference
In-Depth Information
Start the repository with:
$ cd git-recipes
$ git init 04-05
$ cd 04-05
$ git simple-commit removed
The repository is clean and the working directory contains the file removed.txt .
Follow this procedure:
1. Remove removed.txt file with $ rm removed.txt
2. Check the status of the repository. The command:
$ git status
prints:
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what
will be committed)
# (use "git checkout -- <file>..." to discard
changes in working directory)
#
#
deleted:
removed.txt
#
no changes added to commit (use "git add" and/or
"git commit -a")
The file is listed under Changes not staged for commit . Therefore, the
file is unstaged .
3. Check the simplified form of status. The output of $ git status -s
will be:
_D removed.txt
The state is denoted by two characters: a space and a letter D .
4. Commit the changes with
Search WWH ::




Custom Search