1.
The
git stage <file>
command adds the indicated file to the stage, preparing it to become a part of the next commit. Use the git stage <file>
command now to stage the file that you edited.(a)
Provide the command you entered.
(b)
Note that git also has a
git add
command that is equivalent to git stage
. So, you can add files to the stage using either git stage
or git add
. These activities will use git stage
because it seems more descriptive of what is happening. However, you are likely to see git add
used in other resources, so it is worth knowing that they are equivalent. Provide the git add
command that would be equivalent to your answer in Task 3.5.1.a.(c)
- 0
- Correct! After issuing the
git stage
(orgit add
) command the file will be staged. - 1
- Once you have issued the
git stage
command it show that the file is ready to be committed. - 2
- Did you change more than 1 file by accident? Verify that you only changed the file specified in your issue.
- Cannot be determined from the output provided by the
git status
command. - The
git status
command will show you all unstaged and staged files.
Now run the
git status
command again. Compare your output in Task 3.5.1.a to the output in Task 3.4.3.a.How many files are not staged?
Hint.
Staged means a file has been modified and added to the commit.
(d)
- 0
- If you issued the
git stage
command properly the file you changed should appear as ready to be committed. - 1
- Correct! After issuing the
git stage
(orgit add
) command the file will be staged. - 2
- Did you change more than 1 file by accident? Verify that you only changed the file specified in your issue.
- Cannot be determined from the output provided by the
git status
command. - The
git status
command will show you all unstaged and staged files.
How many files are listed as ready to be committed?
Hint.
Staged means a file has been modified and added to the commit.