Counting files in each git status section

A repository contains two tracked files, a.txt and b.txt, and the working tree matches the last commit exactly. You carry out the steps below in order. After each step, enter how many files git status would list under Changes to be committed (Staged), under Changes not staged for commit (Not staged), and under Untracked files (Untracked).

StepStagedNot stagedUntracked
Edit a.txt
Create c.txt
Run git add a.txt c.txt
Edit b.txt
Run git commit
Edit c.txt

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Git Questions: