Why doesn't git commit -a add new files?

Posted by splintor on Stack Overflow See other posts from Stack Overflow or by splintor
Published on 2010-05-03T16:00:20Z Indexed on 2010/05/03 16:28 UTC
Read the original article Hit count: 338

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about git

Related posts about commit