FunctionRacerProblemsRace

What Is Staged

EasyGita shell script

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

Race itor take your time

Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.

More Git problems