The -A
option adds, modifies, and removes index entries to match the working tree.
In Git 2 the -A
option is now the default.
When a .
is added that limits the scope of the update to the directory you are currently in, as per the Git documentation
If no
<pathspec>
is given when -A option is used, all files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
One thing that I would add is that if the --interactive
or -p
mode is used then git add
will behave as if the update (-u
) flag was used and not add new files.