Github notes

“Changes not staged for commit” ?

The files are already added to Git to be monitored, but the changes are not added to be committed. To be add, it needs

git add <filename>

This allows the changes to be recorded for multiple commits separately.

For example, let’s say you have file a, file b . You modify file a and file b , but you don’t want all of them to be in one single commit. You type

git add a
git commit a -m "fixes in a"
git add b
git commit b -m "fixes in b"

As a side note, if you want to commit everything you can just type

git commit -a



Leave a Reply

Your email address will not be published. Required fields are marked *