Put in order · Vibe coding with Claude Code course · Module 15: Advanced Claude Code
Ordering: The smart-commit script
Arrange the steps of the smart-commit.sh script:
Items to put in order
- Take the diff from the staging area (git diff --cached) into the DIFF variable
- Pipe the diff into claude -p and catch the message in the MESSAGE variable
- End the script when DIFF is empty
- Run git commit -m only after the answer y
- Show the proposal and ask for consent through read
You can check the correct answer by solving this task in the CodeWorlds game.