What does “Changes not staged for commit” mean

前端 未结 9 2008
再見小時候
再見小時候 2021-01-29 17:17

I thought if you want to track the files you should git add [files you want to track]

I don\'t know why I got the messages Changes not staged for com

9条回答
  •  花落未央
    2021-01-29 18:01

    It's another way of Git telling you:

    Hey, I see you made some changes, but keep in mind that when you write pages to my history, those changes won't be in these pages.

    Changes to files are not staged if you do not explicitly git add them (and this makes sense).

    So when you git commit, those changes won't be added since they are not staged. If you want to commit them, you have to stage them first (ie. git add).

提交回复
热议问题