What does `git add -A` really do? -
according the git documentation:
-a
--all
--no-ignore-removalupdate index not working tree has file matching
<pathspec>
index has entry. adds, modifies, , removes index entries match working tree.if no
<pathspec>
given when -a option used, files in entire working tree updated (old versions of git used limit update current directory , subdirectories).
i understood mean when run git add -a subdirectory
, git doing this:
$ git update-index --again $ git add subdirectory
however, upon doing simple test in local dummy git repository, not update files outside of <pathspec>
have been staged. in fact, can't find difference in behavior or without -a
option.
can explain behavior of -a
option git add
(the git documentation's explanations bit bitter swallow)?
the --no-ignore-removal
clue. means if file does not appear in working tree does appear in index - e.g. if have rm
ed not git rm
ed - removed index (as if had git rm
ed it).
Comments
Post a Comment