I make short visual coding interview lessons for Hired in 60. I wanted to change an explanation without dragging clips around a timeline. The Python pipeline gives each step in the explanation an ID, so I can rebuild a scene when its narration changes.
Here is one exercise from the series. First, recover a commit with Git. Then see how I use the steps in the exercise to time an animation.
Recover a commit on a rescue branch
Run this whole block in Bash with Git 2.28 or later. It starts with a clean environment, creates a disposable repository, commits a notes file, then moves main back one commit inside that repository.
env -i PATH="$PATH" GIT_CONFIG_NOSYSTEM=1 bash <<'BASH'
set -eu
demo_dir=$(mktemp -d)
trap 'rm -rf -- "$demo_dir"' EXIT
cd "$demo_dir"
git init -q -b main --template=
git config user.name "Git practice"
git config user.email demo@example.com
git commit -q --allow-empty -m "Start the exercise"
printf '%s\n' 'Reflog can locate a recorded commit.' > notes.txt
git add -- notes.txt
git commit -q -m "Add the problem notes"
git reset --hard HEAD~1
git reflog -2
git branch rescue 'HEAD@{1}'
git show rescue:notes.txt
git log -1 --format='%s' main
BASH
You should see Reflog can locate a recorded commit. from the rescue branch and Start the exercise from main. Here HEAD@{1} is the commit just before the reset. When recovering real work, inspect the reflog and pick the entry you can identify by its message or commit ID. git show rescue:notes.txt lets you inspect the file on the rescue branch before deciding what to restore.
Timing a scene from the narration
In the Shorts pipeline, a JSON script groups the narration into named segments. Kokoro ONNX renders the segments locally on the CPU. The script joins the audio and records the start and duration of each segment. The animation runs in Manim. Calling self.at(segment_id) lets a scene wait for that segment's scheduled start before revealing the next command.
A Git scene can show the reset, highlight the former commit in the reflog, and reveal the file on the rescue branch. Giving each reveal its own narration segment makes it possible to revise a sentence and regenerate the timeline from the new audio.
The subtitles use the same timing data. Within a segment, character position estimates the timing of a caption chunk. It is useful for scheduling, and dense command names still deserve a playback check. My caption checker measures when the rendered caption band changes against the scheduled starts. Playback is the check for whether the command is readable as the narration names it.
FFmpeg composites the animated scene and the transparent caption layer and exports the vertical lesson. The 36-second Git recovery walkthrough is a separate worked example with its own English caption track.
Try the free Git recovery exercise. If you want printable notes for more topics, the optional Interview Quick Review Pack is $12 USD.
AI disclosure. An AI agent drafted this article from the project's actual workflow and release notes. The commands were tested in a disposable Git repository.
Top comments (0)