Amandeep Pasricha14,931 Points
I still don't understand why a deleted file is not sent to the stages for commit?
Again, as the questions asks. I don't get his explanation.
Jamie ReardonTreehouse Project Reviewer
Only modified files go to the staging area, via the git add subcommand. When you make changes to a file, it's "modified". Therefore, when you add them via the git add subcommand, you are adding them to the staging area/cache.
When using the git rm or mv subcommands, they will go straight to the changes to be committed section.
Tiago Ferrão10,873 Points
however i tried git add . and the file shows on the
rm git.html ➜ temp_git git:(master) ✗ git status 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: git.html no changes added to commit (use "git add" and/or "git commit -a")
➜ temp_git git:(master) ✗ git add . ➜ temp_git git:(master) ✗ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage)
considering the above, what is the difference between git rm or git add ?