Changes not staged means that the content of the workspace has been modified but not added to the stage. The following two operations are possible at this time:
- It is used
git add filename
to upload the modification of these work areas to the temporary storage area. - Use
git checkout --filename
to cancel the modification of the work area. If you want to undo the modification of multiple files, you can usegit reset --hard HEAD
Untracked files are newly added files in the workspace , but they have never been added to the staging area (stage), which means that git cannot track the changes of these new files at this time.
At this operation is git add filename
to ensure that these new files can be tracked (not required if these files are not important if the tracking git these files may be added to the file which .gitignore).