lab 5 Staging Changes

Goals

Add Changes 01

Now tell git to stage the changes. Check the status

Execute:

git add hello.c
git status

You should see …

Output:

$ git add hello.c
$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD ..." to unstage)

	modified:   hello.c

The change to the hello.c file has been staged. This means that git now knows about the change, but the change hasn’t been permanently recorded in the repository yet. The next commit operation will include the staged changes.

If you decide you don’t want to commit that change after all, the status command reminds you that the git reset command can be used to unstage that change.

Table of Contents