Practice this fail.
Whitespace has entered the chat.
Git · Restart as often as you like
Read the error, choose a command, and learn
why it works. Nothing runs on your machine.
Inspect the staged patch for whitespace errors before committing. Do not modify files or inspect only unstaged edits.
Whitespace has entered the chat.
$ git diff --cached --stat
src/app.js | 3 +++
Which command checks staged changes for whitespace errors?
Fixed. By hand.
git diff --cached --checkCombining --cached and --check checks the proposed commit’s patch for whitespace errors and conflict markers. A nonzero exit status signals problems; it does not repair them.
Practice does not affect your daily score or streak.