By adding the file to the staging area, we get it ready to be commited into the repository's final commit log:
1 2 3 4 5 6 7 8 9 10
git add to add the
hello.txt file to the staging area. Our
status now shows us something different: we have "changes to be committed":
And we can see a new command (that you're encouraged to experiment with) that can remove the file from the staging area: "use
git rm --cached <file>... to unstage".
Now that we have something inside of our staging area, we can
commit it. Let's review the
git commit command.