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

后端 未结 5 1647
挽巷
挽巷 2020-12-29 19:55

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

5条回答
  •  孤城傲影
    2020-12-29 20:26

    I suspect the answer is simple (but I doubt I'll be popular for saying it!) -- there is likely no deliberate "why" to this, other than it's how it fell out when the developers implemented it. The priority of the Git project has never been on ease-of-use or user-friendliness.

提交回复
热议问题