What Is Staged
Print the names of the files that are staged for the next commit, one per line. Files that are edited but not staged do not count, and neither do untracked ones.
Example 1
starts as
* 4478d7a (HEAD -> main) three * cd7750c two * 0cbd544 one staged: a.txt changed, not staged: b.txt untracked: new.txt
prints
a.txt
Constraints
- 1 to 3 staged files
- Any order
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Bring Back the FileMedium
- Drop the Last TwoMedium
- Get the New WorkMedium
- Move the EditsMedium
- Off the Wrong BranchMedium
- Only on the BranchMedium
- Pick the LatestMedium
- Publish the BranchMedium