What does “Changes not staged for commit” mean

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 commit.

If those files were not staged, shouldn’t git shows me those files were Untracked like that

enter image description here

All I’ve done was create a new feature from develop branch and worked in feature/change_excel_format branch

I thought Those files should be in staged status,

But git status told me Changes not staged for commit

enter image description here

To brief,
I only know there are 3 stages in git untracked, staged, committed
Can any one tell me , what was the stage in for Changes not staged for commit
enter image description here

So if I modified the file a (already in the repo)

and type git st , the git will tell me Changes not staged for commit

if I git a then the file a will be in staged status

if I modified the file a now, there will be two status of file a in git, right ?

So I have to decide if make the staged a be commit or make the not stage a to be staged,
and then the previous staged file awill be discard ?

enter image description here

11 Answers
11

Leave a Comment