I'm a bit new to git, and I fail to understand why git commit -a
only stages changed and deleted files but not new files.
Can anyone explain why is it like this, and why there is no other commit flag to enable adding files and committing in one command?
BTW, hg commit -A adds both new and deleted files to the commit
git commit -A
because 1.) adding new files is relatively uncommon; also most other VCS require explicitscm add <file>
step 2.).gitignore
and like files are not perfect, which could lead to adding unwanted files to commit. – Bunsen-a
behavior – Halsy