Sublime Forum

[Commit Problem]

#1

Tracked files changed, showed in git status, yet gui button stays on “nothing to commit”.

0 Likes

#2

Because you did not stage the files maybe ?

0 Likes

#3

Thank you, you’re right. I don’t know why I should stage files that I want to commit. Is this a git command? I mistook it for stash.

0 Likes

#4

Yes, staging (done via git add) adds files to the staging area (a.k.a. index) to prepare what will be ultimately committed when you do a git commit.

git stash is a command for having git take modifications to files that git is already tracking and stashing them in a special stack of pending changes to put your working directory back into a “clean” state.

You’d generally think of a git add and git commit combination as making your changes permanent while a git stash is for setting them aside so that you can come back to them later to do more work, etc.

0 Likes

#5

Thanks a lot for your explanation!

0 Likes

#6

You can also see the git add specifics when you search for a command with the word stage in it:

0 Likes