6. Staging the changes
- To learn to stage changes for the upcoming commits
01 Adding changes
Now command git to stage changes. Check the status
git add hello.html git status
You will see …
$ git add hello.html $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: hello.html #
Changes to the hello.html have been staged. This means that git knows about the change, but it is not permanent in the repository. The next commit will include the chages staged.
Should you decide not to commit the change, the status command will remind you that you can use the
git reset command to unstage these changes.