What does `git add -A` really do? -


according the git documentation:

-a
--all
--no-ignore-removal

update 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 rmed not git rmed - removed index (as if had git rmed it).


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -