Explain -A flag in Git

Can someone explain the -A flag for git? ( --all, --no-ignore-removal )

I can see in the man pages it says this :

-A, --all, --no-ignore-removal
           Update the index not only where the working tree has a file
           matching <pathspec> but also where the index already has an entry.
           This adds, modifies, and removes index entries to match the working
           tree.

           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).

Would it be correct to translate that to plain English into "it will add files no matter where you are in the directory tree when you are running the command". Would that be okay?

And also, would this mean "simply run git add -A . all the time just to be sure".



Read more here: https://stackoverflow.com/questions/64190278/explain-a-flag-in-git

Content Attribution

This content was originally published by Matias Barrios at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: