We know that git add . can stage all the new files or changes at once.
But if you delete files directly by rm command, git add . will not stage these modification.
Is there a efficient command to stage all the changes including deletion in a sub-directory?
You can use the
-uoption togit addto do this, for example:The documentation for
-usays:If you also wanted to add new, untracked files, you could use
-Ainstead of-u.