I found that most of the dev are using "git add --all" instead of "git add -u", Can you please help me out?
2 Answers
If you look at the docs you can see the differences
Update the index just where it already has an entry matching
<pathspec>. This removes as well as modifies index entries to match the working tree, but adds no new files.If no
<pathspec>is given when-uoption is used, all tracked files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
Update the index not only where the working tree has a file matching 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-Aoption 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).
git add? Both options are explained there very clear.