What does “Changes not staged for commit” mean

前端 未结 9 2101
再見小時候
再見小時候 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:03

    You may see this error when you have added a new file to your code and you're now trying to commit the code without staging(adding) it.

    To overcome this, you may first add the file by using git add (git add your_file_name.py) and then committing the changes (git commit -m "Rename Files" -m "Sample script to rename files as you like")

提交回复
热议问题