Building on the previous scenario here you'll learn how to view changes in your working directory and commit them to your repository. This environment has a Git repository with a committed file. In the working directory a change to the committed file exists and a uncommitted file.
In future scenarios we'll cover how you can undo changes and share commits with other people.
This exercise has demonstrated how you can view your changes and commit them to the repository. In the next scenario we'll investigate how to share these changes with other people.
This exercise has been added to your scrapbook where you can review the example and code you written at any point.
Scenario 2 - Committing Changes
Step 1 - Git Status
As discussed in the previous scenario
git status allows us to view the changes in the working directory and staging area compared to the repository.
Given the current repository running
git status displays that a change has been made in our working directory to a previously committed file, committed.js, but has not yet been moved to the staging area.