{"id":"14-git","number":14,"slug":"git-for-coding-agents","title":"Git is your safety net","short":"Git is your safety net","module":"Your toolkit","summary":"Agents make mistakes fast; git lets you undo them faster. And every coding agent is fluent in git, including the parts nobody remembers. Use commits as save points, history as research material, bisect for bug hunts, and branches to keep work isolated.","voice":"Eric","scenes":[{"template":"title","chapter":"Intro","narration":"Agents make mistakes fast. Git lets you undo them faster. And it turns out every coding agent is fluent in git, including the commands nobody can remember.","params":{"kicker":"Lesson 14","module":"Module 3 · Your toolkit","title":"Git is your *safety net*","subtitle":"Save points, history, and fearless experiments.","bubble":"I speak fluent git.","mood":"happy"},"start":0.5,"dur":11.466,"words":[{"text":"Agents","s":0.8,"e":1.28},{"text":"make","s":1.36,"e":1.52},{"text":"mistakes","s":1.64,"e":2},{"text":"fast.","s":2.16,"e":2.88},{"text":"Git","s":3.12,"e":3.36},{"text":"lets","s":3.48,"e":3.6},{"text":"you","s":3.64,"e":3.68},{"text":"undo","s":3.76,"e":4.08},{"text":"them","s":4.16,"e":4.32},{"text":"faster.","s":4.4,"e":5.12},{"text":"And","s":5.36,"e":5.44},{"text":"it","s":5.48,"e":5.52},{"text":"turns","s":5.64,"e":5.84},{"text":"out","s":5.92,"e":6.16},{"text":"every","s":6.32,"e":6.56},{"text":"coding","s":6.64,"e":6.96},{"text":"agent","s":7.12,"e":7.28},{"text":"is","s":7.36,"e":7.44},{"text":"fluent","s":7.52,"e":7.84},{"text":"in","s":7.92,"e":8},{"text":"git,","s":8.08,"e":8.64},{"text":"including","s":8.88,"e":9.12},{"text":"the","s":9.16,"e":9.2},{"text":"commands","s":9.28,"e":9.68},{"text":"nobody","s":9.76,"e":10.16},{"text":"can","s":10.24,"e":10.32},{"text":"remember.","s":10.4,"e":11.12}]},{"template":"quote","chapter":"Fluent in git","narration":"Simon Willison points out that all the coding agents are fluent in git's features, both basic and advanced. That means we can be more ambitious with git ourselves. We don't need to memorize how to do things. We just need to know what's possible.","params":{"text":"We don't need to memorize *how* to do things with Git, but staying aware of what's possible means we can take advantage of the full suite.","who":"Simon Willison","role":"Agentic Engineering Patterns","src":"Using Git with coding agents"},"start":11.966,"dur":15.056,"words":[{"text":"Simon","s":12.266,"e":12.666},{"text":"Willison","s":12.746,"e":13.226},{"text":"points","s":13.386,"e":13.546},{"text":"out","s":13.666,"e":13.786},{"text":"that","s":13.906,"e":14.026},{"text":"all","s":14.146,"e":14.266},{"text":"the","s":14.306,"e":14.346},{"text":"coding","s":14.426,"e":14.666},{"text":"agents","s":14.746,"e":15.066},{"text":"are","s":15.146,"e":15.306},{"text":"fluent","s":15.386,"e":15.706},{"text":"in","s":15.786,"e":15.866},{"text":"git's","s":15.946,"e":16.186},{"text":"features,","s":16.426,"e":16.906},{"text":"both","s":17.026,"e":17.146},{"text":"basic","s":17.426,"e":17.706},{"text":"and","s":17.826,"e":17.946},{"text":"advanced.","s":18.226,"e":19.066},{"text":"That","s":19.146,"e":19.226},{"text":"means","s":19.306,"e":19.546},{"text":"we","s":19.626,"e":19.706},{"text":"can","s":19.786,"e":19.866},{"text":"be","s":19.946,"e":20.026},{"text":"more","s":20.106,"e":20.186},{"text":"ambitious","s":20.306,"e":20.746},{"text":"with","s":20.826,"e":20.906},{"text":"git","s":20.986,"e":21.066},{"text":"ourselves.","s":21.146,"e":22.186},{"text":"We","s":22.226,"e":22.266},{"text":"don't","s":22.306,"e":22.426},{"text":"need","s":22.506,"e":22.586},{"text":"to","s":22.666,"e":22.826},{"text":"memorize","s":22.906,"e":23.386},{"text":"how","s":23.426,"e":23.466},{"text":"to","s":23.546,"e":23.626},{"text":"do","s":23.706,"e":23.866},{"text":"things.","s":24.066,"e":24.586},{"text":"We","s":24.666,"e":24.746},{"text":"just","s":24.826,"e":24.906},{"text":"need","s":24.986,"e":25.066},{"text":"to","s":25.146,"e":25.226},{"text":"know","s":25.306,"e":25.386},{"text":"what's","s":25.426,"e":25.626},{"text":"possible.","s":25.866,"e":26.426}]},{"template":"flow","chapter":"Save points","narration":"The first habit is save points. Commit after every step that works. In Anthropic's long-running agent experiments, committing progress with descriptive messages let the agent revert bad changes by itself. Brendan O'Leary treats these small local commits as his first pull request review.","params":{"nodes":[{"label":"Small step","sub":"one change","kind":"agent","at":"every step"},{"label":"Tests pass","sub":"verified","kind":"test","at":"works"},{"label":"Commit","sub":"a save point","kind":"git","at":"Commit"},{"label":"Review the diff","sub":"your first PR review","kind":"human","at":"first pull request"}],"caption":"If the next step goes wrong, you're one command from safety.","caption_at":"revert"},"start":27.022,"dur":19.314,"words":[{"text":"The","s":27.322,"e":27.482},{"text":"first","s":27.562,"e":27.802},{"text":"habit","s":28.002,"e":28.202},{"text":"is","s":28.282,"e":28.442},{"text":"save","s":28.522,"e":28.762},{"text":"points.","s":28.842,"e":29.322},{"text":"Commit","s":29.802,"e":30.122},{"text":"after","s":30.282,"e":30.442},{"text":"every","s":30.602,"e":30.842},{"text":"step","s":31.002,"e":31.242},{"text":"that","s":31.322,"e":31.402},{"text":"works.","s":31.482,"e":32.202},{"text":"In","s":32.522,"e":32.602},{"text":"Anthropic's","s":32.722,"e":33.242},{"text":"long-running","s":33.322,"e":33.882},{"text":"agent","s":33.962,"e":34.202},{"text":"experiments,","s":34.282,"e":35.242},{"text":"committing","s":35.322,"e":35.642},{"text":"progress","s":35.722,"e":36.202},{"text":"with","s":36.282,"e":36.362},{"text":"descriptive","s":36.442,"e":37.002},{"text":"messages","s":37.082,"e":37.642},{"text":"let","s":37.722,"e":37.882},{"text":"the","s":37.922,"e":37.962},{"text":"agent","s":38.042,"e":38.362},{"text":"revert","s":38.442,"e":38.842},{"text":"bad","s":38.922,"e":39.082},{"text":"changes","s":39.162,"e":39.562},{"text":"by","s":39.642,"e":39.722},{"text":"itself.","s":39.842,"e":40.602},{"text":"Brendan","s":40.842,"e":41.162},{"text":"O'Leary","s":41.242,"e":41.722},{"text":"treats","s":41.762,"e":42.042},{"text":"these","s":42.162,"e":42.282},{"text":"small","s":42.362,"e":42.682},{"text":"local","s":42.762,"e":43.082},{"text":"commits","s":43.162,"e":43.642},{"text":"as","s":43.722,"e":43.802},{"text":"his","s":43.882,"e":43.962},{"text":"first","s":44.122,"e":44.362},{"text":"pull","s":44.442,"e":44.602},{"text":"request","s":44.682,"e":45.002},{"text":"review.","s":45.082,"e":45.722}]},{"template":"terminal","chapter":"Seed with history","narration":"History is also great context. Starting a fresh session? Ask the agent to look at the recent changes. It runs git log and git diff, and instantly knows what you've been working on, from both the code and the commit messages.","params":{"title":"~/shop · new session","lines":[{"k":"you","text":"review the recent changes and tell me where we left off","at":"recent changes"},{"k":"tool","text":"Bash(git log --oneline -8)","at":"git log"},{"k":"tool","text":"Bash(git diff HEAD~3 --stat)","at":"git diff"},{"k":"agent","text":"You're midway through CSV export: streaming works,"},{"k":"agent","text":"filters are done, pagination was reverted. Next: large reports.","at":"instantly knows"}]},"start":46.336,"dur":14.821,"words":[{"text":"History","s":46.636,"e":47.116},{"text":"is","s":47.196,"e":47.436},{"text":"also","s":47.516,"e":47.836},{"text":"great","s":47.996,"e":48.316},{"text":"context.","s":48.396,"e":49.116},{"text":"Starting","s":49.516,"e":49.836},{"text":"a","s":49.863,"e":49.889},{"text":"fresh","s":49.916,"e":50.156},{"text":"session?","s":50.356,"e":50.636},{"text":"Ask","s":51.116,"e":51.356},{"text":"the","s":51.436,"e":51.516},{"text":"agent","s":51.596,"e":51.836},{"text":"to","s":51.916,"e":51.996},{"text":"look","s":52.076,"e":52.156},{"text":"at","s":52.196,"e":52.236},{"text":"the","s":52.316,"e":52.356},{"text":"recent","s":52.396,"e":52.636},{"text":"changes.","s":52.716,"e":53.276},{"text":"It","s":53.676,"e":53.756},{"text":"runs","s":53.836,"e":54.076},{"text":"git","s":54.156,"e":54.316},{"text":"log","s":54.396,"e":54.716},{"text":"and","s":54.796,"e":54.876},{"text":"git","s":54.956,"e":55.196},{"text":"diff,","s":55.276,"e":55.676},{"text":"and","s":55.756,"e":55.836},{"text":"instantly","s":55.996,"e":56.476},{"text":"knows","s":56.556,"e":56.796},{"text":"what","s":56.876,"e":56.956},{"text":"you've","s":56.996,"e":57.116},{"text":"been","s":57.196,"e":57.276},{"text":"working","s":57.436,"e":57.596},{"text":"on,","s":57.676,"e":58.076},{"text":"from","s":58.156,"e":58.236},{"text":"both","s":58.316,"e":58.396},{"text":"the","s":58.476,"e":58.556},{"text":"code","s":58.636,"e":58.956},{"text":"and","s":59.116,"e":59.276},{"text":"the","s":59.356,"e":59.396},{"text":"commit","s":59.436,"e":59.676},{"text":"messages.","s":59.756,"e":60.556}]},{"template":"chat","chapter":"History as research","narration":"Git history answers why questions too. Boris Cherny's example: ask why a function has weird arguments, and the agent digs through the commits and the linked issues to find out. There's nothing in the system prompt about this, he says. If you tell it to use git, it knows how.","params":{"messages":[{"from":"you","text":"why does `applyDiscount` take a `legacyMode` flag? check the git history","at":"weird arguments"},{"from":"agent","text":"It was added in 2023 (commit 4e1a9c0) for old invoices issued before VAT changes, per issue #212. Nothing calls it with `true` since March. Safe to remove behind a test.","tone":"good","at":"digs"}]},"start":61.157,"dur":18.034,"words":[{"text":"Git","s":61.457,"e":61.657},{"text":"history","s":61.697,"e":62.051},{"text":"answers","s":62.097,"e":62.52},{"text":"why","s":62.577,"e":62.817},{"text":"questions","s":62.897,"e":63.404},{"text":"too.","s":63.457,"e":63.857},{"text":"Boris","s":64.217,"e":64.897},{"text":"Cherny's","s":64.977,"e":65.377},{"text":"example:","s":65.617,"e":65.937},{"text":"ask","s":66.497,"e":66.737},{"text":"why","s":66.817,"e":66.897},{"text":"a","s":66.977,"e":67.057},{"text":"function","s":67.137,"e":67.457},{"text":"has","s":67.537,"e":67.697},{"text":"weird","s":67.777,"e":68.017},{"text":"arguments,","s":68.097,"e":68.897},{"text":"and","s":68.977,"e":69.057},{"text":"the","s":69.137,"e":69.217},{"text":"agent","s":69.297,"e":69.537},{"text":"digs","s":69.697,"e":69.937},{"text":"through","s":70.017,"e":70.097},{"text":"the","s":70.137,"e":70.177},{"text":"commits","s":70.297,"e":70.657},{"text":"and","s":70.737,"e":70.897},{"text":"the","s":70.937,"e":70.977},{"text":"linked","s":71.057,"e":71.297},{"text":"issues","s":71.497,"e":71.697},{"text":"to","s":71.777,"e":71.857},{"text":"find","s":71.977,"e":72.097},{"text":"out.","s":72.177,"e":72.417},{"text":"There's","s":72.897,"e":73.057},{"text":"nothing","s":73.217,"e":73.457},{"text":"in","s":73.537,"e":73.577},{"text":"the","s":73.617,"e":73.697},{"text":"system","s":73.777,"e":74.017},{"text":"prompt","s":74.097,"e":74.337},{"text":"about","s":74.417,"e":74.657},{"text":"this,","s":74.817,"e":75.137},{"text":"he","s":75.217,"e":75.297},{"text":"says.","s":75.457,"e":75.857},{"text":"If","s":76.097,"e":76.177},{"text":"you","s":76.257,"e":76.337},{"text":"tell","s":76.417,"e":76.497},{"text":"it","s":76.537,"e":76.577},{"text":"to","s":76.657,"e":76.737},{"text":"use","s":76.817,"e":76.977},{"text":"git,","s":77.137,"e":77.617},{"text":"it","s":77.697,"e":77.777},{"text":"knows","s":77.857,"e":78.017},{"text":"how.","s":78.177,"e":78.577}]},{"template":"list","chapter":"Superpowers","narration":"A few git superpowers become everyday tools. Bisect: give the agent a test for a bug, and it binary-searches history to find the commit that caused it. Reflog: lost work that was never committed? The agent can often find it. Merge conflicts: it reasons about the intent of both sides, then runs the tests. And cleanup: it remembers the exact command to undo your last commit.","params":{"title":"Git superpowers, on demand","items":[{"text":"Bisect","sub":"“find the commit that broke this”","at":"Bisect"},{"text":"Reflog","sub":"recover work you thought was lost","at":"Reflog"},{"text":"Merge conflicts","sub":"resolved by intent, then tested","at":"Merge conflicts"},{"text":"Cleanup","sub":"undo, split, squash, rewrite messages","at":"cleanup"}]},"start":79.191,"dur":26.263,"words":[{"text":"A","s":79.491,"e":79.651},{"text":"few","s":79.731,"e":79.811},{"text":"git","s":79.891,"e":80.131},{"text":"superpowers","s":80.211,"e":80.931},{"text":"become","s":81.011,"e":81.331},{"text":"everyday","s":81.411,"e":81.891},{"text":"tools.","s":81.971,"e":82.771},{"text":"Bisect:","s":83.091,"e":84.131},{"text":"give","s":84.211,"e":84.291},{"text":"the","s":84.371,"e":84.451},{"text":"agent","s":84.611,"e":84.771},{"text":"a","s":84.811,"e":84.851},{"text":"test","s":84.931,"e":85.171},{"text":"for","s":85.211,"e":85.251},{"text":"a","s":85.331,"e":85.411},{"text":"bug,","s":85.491,"e":85.971},{"text":"and","s":86.011,"e":86.051},{"text":"it","s":86.131,"e":86.291},{"text":"binary-searches","s":86.491,"e":87.091},{"text":"history","s":87.171,"e":87.651},{"text":"to","s":87.731,"e":87.811},{"text":"find","s":87.891,"e":87.971},{"text":"the","s":88.051,"e":88.131},{"text":"commit","s":88.291,"e":88.451},{"text":"that","s":88.531,"e":88.611},{"text":"caused","s":88.691,"e":88.931},{"text":"it.","s":89.011,"e":89.451},{"text":"Reflog:","s":89.731,"e":90.771},{"text":"lost","s":90.851,"e":91.091},{"text":"work","s":91.171,"e":91.411},{"text":"that","s":91.451,"e":91.491},{"text":"was","s":91.571,"e":91.651},{"text":"never","s":91.731,"e":91.891},{"text":"committed?","s":91.971,"e":92.691},{"text":"The","s":92.771,"e":92.851},{"text":"agent","s":92.931,"e":93.171},{"text":"can","s":93.251,"e":93.331},{"text":"often","s":93.411,"e":93.571},{"text":"find","s":93.651,"e":93.891},{"text":"it.","s":93.971,"e":94.371},{"text":"Merge","s":94.691,"e":94.931},{"text":"conflicts:","s":95.011,"e":95.971},{"text":"it","s":96.051,"e":96.211},{"text":"reasons","s":96.371,"e":96.611},{"text":"about","s":96.731,"e":96.851},{"text":"the","s":96.891,"e":96.931},{"text":"intent","s":97.011,"e":97.411},{"text":"of","s":97.531,"e":97.651},{"text":"both","s":97.771,"e":97.891},{"text":"sides,","s":97.971,"e":98.531},{"text":"then","s":98.611,"e":98.771},{"text":"runs","s":98.851,"e":99.011},{"text":"the","s":99.091,"e":99.171},{"text":"tests.","s":99.411,"e":100.131},{"text":"And","s":100.291,"e":100.451},{"text":"cleanup:","s":100.691,"e":101.491},{"text":"it","s":101.571,"e":101.651},{"text":"remembers","s":101.731,"e":102.131},{"text":"the","s":102.171,"e":102.211},{"text":"exact","s":102.291,"e":102.691},{"text":"command","s":102.771,"e":103.171},{"text":"to","s":103.251,"e":103.331},{"text":"undo","s":103.411,"e":103.731},{"text":"your","s":103.811,"e":103.891},{"text":"last","s":103.971,"e":104.211},{"text":"commit.","s":104.411,"e":104.851}]},{"template":"terminal","chapter":"Superpowers","narration":"Here's bisect in action. You describe the bug. The agent writes a tiny script that reproduces it, hands it to git bisect, and comes back with the exact commit. Simon Willison notes this turns bisect from an occasional tool into one you can use whenever you're curious.","params":{"title":"~/shop · hunting a regression","lines":[{"k":"you","text":"totals were right last month and wrong now. find the commit.","at":"describe the bug"},{"k":"tool","text":"Write(check_total.sh)  # exits 1 when the total is wrong","at":"tiny script"},{"k":"tool","text":"Bash(git bisect start HEAD v2.3 && git bisect run ./check_total.sh)","at":"git bisect"},{"k":"dim","text":"  Bisecting: 37 revisions left to test after this (roughly 5 steps)"},{"k":"ok","text":"7f0b13d is the first bad commit: \"stream rows instead of buffering\"","at":"exact commit"}]},"start":105.454,"dur":18.348,"words":[{"text":"Here's","s":105.754,"e":105.994},{"text":"bisect","s":106.074,"e":106.554},{"text":"in","s":106.634,"e":106.794},{"text":"action.","s":106.874,"e":107.554},{"text":"You","s":107.834,"e":107.914},{"text":"describe","s":108.154,"e":108.394},{"text":"the","s":108.434,"e":108.474},{"text":"bug.","s":108.554,"e":109.114},{"text":"The","s":109.354,"e":109.434},{"text":"agent","s":109.514,"e":109.834},{"text":"writes","s":109.914,"e":110.074},{"text":"a","s":110.154,"e":110.234},{"text":"tiny","s":110.434,"e":110.634},{"text":"script","s":110.714,"e":111.034},{"text":"that","s":111.114,"e":111.194},{"text":"reproduces","s":111.274,"e":111.914},{"text":"it,","s":111.994,"e":112.474},{"text":"hands","s":112.594,"e":112.714},{"text":"it","s":112.794,"e":112.874},{"text":"to","s":112.914,"e":112.954},{"text":"git","s":113.034,"e":113.194},{"text":"bisect,","s":113.274,"e":113.994},{"text":"and","s":114.074,"e":114.154},{"text":"comes","s":114.314,"e":114.474},{"text":"back","s":114.594,"e":114.714},{"text":"with","s":114.794,"e":114.874},{"text":"the","s":114.914,"e":114.954},{"text":"exact","s":115.034,"e":115.514},{"text":"commit.","s":115.594,"e":115.994},{"text":"Simon","s":116.554,"e":116.874},{"text":"Willison","s":116.954,"e":117.354},{"text":"notes","s":117.434,"e":117.674},{"text":"this","s":117.834,"e":117.994},{"text":"turns","s":118.074,"e":118.314},{"text":"bisect","s":118.394,"e":118.874},{"text":"from","s":118.994,"e":119.114},{"text":"an","s":119.274,"e":119.354},{"text":"occasional","s":119.474,"e":119.914},{"text":"tool","s":119.994,"e":120.314},{"text":"into","s":120.554,"e":120.794},{"text":"one","s":120.874,"e":120.954},{"text":"you","s":121.034,"e":121.114},{"text":"can","s":121.194,"e":121.274},{"text":"use","s":121.354,"e":121.514},{"text":"whenever","s":121.594,"e":122.074},{"text":"you're","s":122.154,"e":122.314},{"text":"curious.","s":122.434,"e":123.194}]},{"template":"statement","chapter":"Branches and worktrees","narration":"Use one branch per task, so experiments stay isolated and easy to throw away. And when you want several agents working at once, git worktrees give each one its own checkout of the repo. Matt Pocock says he now uses worktrees for everything. We'll go deep on that in module four.","params":{"text":"One task, one *branch*. Several agents? One *worktree* each.","sub":"Isolated experiments are cheap to keep and cheap to throw away.","art":"branch","tone":"agent","sync":false},"start":123.802,"dur":18.818,"words":[{"text":"Use","s":124.102,"e":124.342},{"text":"one","s":124.502,"e":124.662},{"text":"branch","s":124.742,"e":124.982},{"text":"per","s":125.062,"e":125.222},{"text":"task,","s":125.302,"e":126.022},{"text":"so","s":126.102,"e":126.182},{"text":"experiments","s":126.262,"e":126.822},{"text":"stay","s":126.942,"e":127.062},{"text":"isolated","s":127.142,"e":127.782},{"text":"and","s":127.862,"e":128.102},{"text":"easy","s":128.262,"e":128.422},{"text":"to","s":128.462,"e":128.502},{"text":"throw","s":128.582,"e":128.742},{"text":"away.","s":128.822,"e":129.422},{"text":"And","s":129.702,"e":129.942},{"text":"when","s":130.102,"e":130.182},{"text":"you","s":130.222,"e":130.262},{"text":"want","s":130.342,"e":130.502},{"text":"several","s":130.582,"e":130.902},{"text":"agents","s":131.062,"e":131.222},{"text":"working","s":131.302,"e":131.542},{"text":"at","s":131.622,"e":131.702},{"text":"once,","s":131.782,"e":132.422},{"text":"git","s":132.502,"e":132.742},{"text":"worktrees","s":132.822,"e":133.382},{"text":"give","s":133.502,"e":133.622},{"text":"each","s":133.702,"e":133.862},{"text":"one","s":134.022,"e":134.102},{"text":"its","s":134.222,"e":134.342},{"text":"own","s":134.422,"e":134.582},{"text":"checkout","s":134.662,"e":135.062},{"text":"of","s":135.102,"e":135.142},{"text":"the","s":135.182,"e":135.222},{"text":"repo.","s":135.302,"e":135.982},{"text":"Matt","s":136.262,"e":136.422},{"text":"Pocock","s":136.502,"e":136.982},{"text":"says","s":137.102,"e":137.222},{"text":"he","s":137.302,"e":137.382},{"text":"now","s":137.462,"e":137.622},{"text":"uses","s":137.782,"e":137.942},{"text":"worktrees","s":138.022,"e":138.502},{"text":"for","s":138.622,"e":138.742},{"text":"everything.","s":138.822,"e":139.622},{"text":"We'll","s":139.862,"e":140.022},{"text":"go","s":140.062,"e":140.102},{"text":"deep","s":140.262,"e":140.422},{"text":"on","s":140.502,"e":140.582},{"text":"that","s":140.702,"e":140.822},{"text":"in","s":140.862,"e":140.902},{"text":"module","s":140.982,"e":141.302},{"text":"four.","s":141.462,"e":142.022}]},{"template":"compare","chapter":"Guard rails","narration":"One caution. Agents are fluent in the dangerous commands too. Force-pushing, hard resets and history rewrites on shared branches can destroy other people's work. Let the agent experiment freely on its own branch, and require your approval for anything that can't be undone.","params":{"left":{"title":"Let it run","tone":"good","items":["Commits on its own branch","Local history cleanup","Bisect, log, blame, diff"],"at":"experiment freely"},"right":{"title":"Ask me first","tone":"bad","items":["Force-push","Hard reset on shared branches","Deleting branches or rewriting shared history"],"at":"can't be undone"}},"start":142.62,"dur":18.661,"words":[{"text":"One","s":142.92,"e":143.12},{"text":"caution.","s":143.16,"e":143.72},{"text":"Agents","s":144,"e":144.613},{"text":"are","s":144.68,"e":144.88},{"text":"fluent","s":144.92,"e":145.32},{"text":"in","s":145.4,"e":145.48},{"text":"the","s":145.52,"e":145.56},{"text":"dangerous","s":145.64,"e":145.96},{"text":"commands","s":146.04,"e":146.44},{"text":"too.","s":146.52,"e":147.12},{"text":"Force-pushing,","s":147.4,"e":148.36},{"text":"hard","s":148.48,"e":148.6},{"text":"resets","s":148.68,"e":149.24},{"text":"and","s":149.32,"e":149.48},{"text":"history","s":149.56,"e":149.96},{"text":"rewrites","s":150.04,"e":150.44},{"text":"on","s":150.52,"e":150.6},{"text":"shared","s":150.76,"e":151},{"text":"branches","s":151.24,"e":151.48},{"text":"can","s":151.8,"e":151.88},{"text":"destroy","s":151.96,"e":152.52},{"text":"other","s":152.6,"e":152.76},{"text":"people's","s":152.84,"e":153.16},{"text":"work.","s":153.24,"e":153.56},{"text":"Let","s":154.2,"e":154.28},{"text":"the","s":154.36,"e":154.44},{"text":"agent","s":154.52,"e":154.76},{"text":"experiment","s":154.84,"e":155.4},{"text":"freely","s":155.56,"e":155.88},{"text":"on","s":155.96,"e":156.04},{"text":"its","s":156.12,"e":156.28},{"text":"own","s":156.36,"e":156.52},{"text":"branch,","s":156.6,"e":157.16},{"text":"and","s":157.24,"e":157.4},{"text":"require","s":157.64,"e":157.88},{"text":"your","s":157.96,"e":158.04},{"text":"approval","s":158.32,"e":158.6},{"text":"for","s":158.68,"e":158.84},{"text":"anything","s":158.92,"e":159.32},{"text":"that","s":159.4,"e":159.48},{"text":"can't","s":159.56,"e":159.8},{"text":"be","s":159.84,"e":159.88},{"text":"undone.","s":159.96,"e":160.68}]},{"template":"quiz","chapter":"Quick check","narration":"Quick check. A bug appeared sometime in the last month, across a few hundred commits. What's the fastest way to find the cause with an agent? Tap your answer.","params":{"q":"A bug appeared sometime in the last month (a few hundred commits). Fastest way to find the cause?","options":["Read every commit yourself","Have the agent write a check for the bug and run git bisect","Revert the whole month","Ask the agent to guess from the file names"],"answer":1,"explain":"Bisect binary-searches history: a few hundred commits take about eight checks."},"start":161.281,"dur":15.139,"words":[{"text":"Quick","s":161.581,"e":161.821},{"text":"check.","s":161.901,"e":162.221},{"text":"A","s":162.701,"e":162.781},{"text":"bug","s":162.861,"e":163.021},{"text":"appeared","s":163.221,"e":163.421},{"text":"sometime","s":163.501,"e":163.981},{"text":"in","s":164.021,"e":164.061},{"text":"the","s":164.101,"e":164.141},{"text":"last","s":164.221,"e":164.461},{"text":"month,","s":164.621,"e":165.101},{"text":"across","s":165.181,"e":165.501},{"text":"a","s":165.581,"e":165.661},{"text":"few","s":165.741,"e":165.821},{"text":"hundred","s":165.901,"e":166.221},{"text":"commits.","s":166.301,"e":166.981},{"text":"What's","s":167.261,"e":167.461},{"text":"the","s":167.501,"e":167.661},{"text":"fastest","s":167.741,"e":168.141},{"text":"way","s":168.221,"e":168.301},{"text":"to","s":168.381,"e":168.461},{"text":"find","s":168.541,"e":168.621},{"text":"the","s":168.701,"e":168.781},{"text":"cause","s":168.861,"e":169.101},{"text":"with","s":169.181,"e":169.261},{"text":"an","s":169.301,"e":169.341},{"text":"agent?","s":169.421,"e":170.221},{"text":"Tap","s":170.341,"e":170.461},{"text":"your","s":170.541,"e":170.621},{"text":"answer.","s":170.821,"e":171.261}]},{"template":"exercise","chapter":"Try it","narration":"Try using history as context. This prompt asks your agent to summarize where the project is heading and to explain why one piece of code is the way it is, without changing anything.","params":{"title":"Try it with your agent","intro":"In any repo with some history:","prompt":"Look at the last 10 commits and summarize where this project is\nheading. Then pick the most confusing function you've seen and tell\nme why it's written that way, using git log -S, blame and any\nlinked issues. Don't modify anything."},"start":176.42,"dur":12.679,"words":[{"text":"Try","s":176.72,"e":176.987},{"text":"using","s":177.04,"e":177.312},{"text":"history","s":177.36,"e":177.92},{"text":"as","s":178,"e":178.16},{"text":"context.","s":178.24,"e":179.04},{"text":"This","s":179.68,"e":179.84},{"text":"prompt","s":179.92,"e":180.24},{"text":"asks","s":180.32,"e":180.64},{"text":"your","s":180.72,"e":180.8},{"text":"agent","s":180.88,"e":181.12},{"text":"to","s":181.2,"e":181.28},{"text":"summarize","s":181.44,"e":181.92},{"text":"where","s":182,"e":182.16},{"text":"the","s":182.2,"e":182.24},{"text":"project","s":182.32,"e":182.72},{"text":"is","s":182.76,"e":182.8},{"text":"heading","s":182.88,"e":183.28},{"text":"and","s":183.6,"e":183.68},{"text":"to","s":183.76,"e":183.84},{"text":"explain","s":184.08,"e":184.32},{"text":"why","s":184.44,"e":184.56},{"text":"one","s":184.72,"e":184.8},{"text":"piece","s":184.96,"e":185.12},{"text":"of","s":185.2,"e":185.28},{"text":"code","s":185.36,"e":185.6},{"text":"is","s":185.68,"e":185.84},{"text":"the","s":185.88,"e":185.92},{"text":"way","s":186,"e":186.08},{"text":"it","s":186.12,"e":186.16},{"text":"is,","s":186.24,"e":186.8},{"text":"without","s":186.96,"e":187.12},{"text":"changing","s":187.2,"e":187.6},{"text":"anything.","s":187.76,"e":188.48}]},{"template":"recap","chapter":"Recap","narration":"Recap. Commit after every working step. Seed sessions with history. Use git's superpowers: bisect, reflog, conflict resolution. One task per branch, one worktree per agent. And keep the irreversible commands behind your approval. Next module: scaling up, starting with subagents.","params":{"items":["Commits are *save points*","History is context and research","Bisect, reflog, conflicts: on demand","Approval for anything irreversible"],"next":"Subagents: delegate to a fresh context","next_at":"Next module"},"start":189.099,"dur":23.947,"words":[{"text":"Recap.","s":189.399,"e":190.239},{"text":"Commit","s":190.519,"e":190.919},{"text":"after","s":190.999,"e":191.239},{"text":"every","s":191.399,"e":191.719},{"text":"working","s":191.799,"e":192.119},{"text":"step.","s":192.199,"e":192.599},{"text":"Seed","s":193.079,"e":193.319},{"text":"sessions","s":193.399,"e":193.879},{"text":"with","s":193.959,"e":194.039},{"text":"history.","s":194.119,"e":194.679},{"text":"Use","s":195.159,"e":195.399},{"text":"git's","s":195.479,"e":195.799},{"text":"superpowers:","s":195.959,"e":196.919},{"text":"bisect,","s":197.079,"e":197.719},{"text":"reflog,","s":197.879,"e":198.599},{"text":"conflict","s":198.719,"e":198.999},{"text":"resolution.","s":199.079,"e":199.719},{"text":"One","s":200.199,"e":200.359},{"text":"task","s":200.439,"e":200.759},{"text":"per","s":200.839,"e":200.919},{"text":"branch,","s":200.999,"e":201.719},{"text":"one","s":201.799,"e":201.959},{"text":"worktree","s":202.039,"e":202.519},{"text":"per","s":202.599,"e":202.759},{"text":"agent.","s":202.839,"e":203.439},{"text":"And","s":203.639,"e":203.959},{"text":"keep","s":204.359,"e":204.519},{"text":"the","s":204.599,"e":204.679},{"text":"irreversible","s":204.759,"e":205.399},{"text":"commands","s":205.479,"e":205.879},{"text":"behind","s":205.959,"e":206.359},{"text":"your","s":206.439,"e":206.519},{"text":"approval.","s":206.759,"e":207.079},{"text":"Next","s":208.039,"e":208.119},{"text":"module:","s":208.519,"e":209.119},{"text":"scaling","s":209.319,"e":209.399},{"text":"up,","s":209.559,"e":209.879},{"text":"starting","s":210.199,"e":210.279},{"text":"with","s":210.359,"e":210.519},{"text":"subagents.","s":210.679,"e":211.479}]}],"total":213.446,"audio":"/audio/14-git.mp3"}