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

后端 未结 5 1731
挽巷
挽巷 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:03

    For Future sake you can stick with this solution from Ian Clelland,

    git add -A && git commit -m "Your Message"
    

    Since it won't be too visible from comment https://stackoverflow.com/a/2419270/5836034

提交回复
热议问题