Git BisectFinding the commit that broke something, by binary search.ComputingYou need a known-good commit and a known-bad one.1Startgit bisect start, then git bisect bad, then git bisect good <sha>.2Test what it checks outGit jumps to the midpoint. Run your test.3Report the resultgit bisect good or git bisect bad. It halves the range each time.4Read the answerGit names the first bad commit. Then git bisect reset.AUTOMATE ITgit bisect run ./test.shExit 0 = good, non-zero = badGit finds the commit unattendedlog₂(n) steps: 1,000 commits is ten tests. The hard part is writing areliable one-line test.Git Bisectlearnposters.com
Git Bisect — printable computing wall chart from LearnPosters. Free vector PDF, US Letter and A4.

Git Bisect, step by step

You need a known-good commit and a known-bad one.

  1. Startgit bisect start, then git bisect bad, then git bisect good <sha>.
  2. Test what it checks outGit jumps to the midpoint. Run your test.
  3. Report the resultgit bisect good or git bisect bad. It halves the range each time.
  4. Read the answerGit names the first bad commit. Then git bisect reset.

Automate it

  • git bisect run ./test.sh
  • Exit 0 = good, non-zero = bad
  • Git finds the commit unattended

log₂(n) steps: 1,000 commits is ten tests. The hard part is writing a reliable one-line test.

Questions about the Git Bisect poster

What’s on the Git Bisect poster?
4 numbered steps, with a full worked run-through. You need a known-good commit and a known-bad one. Start — git bisect start, then git bisect bad, then git bisect good <sha>.; Test what it checks out — Git jumps to the midpoint. Run your test.; Report the result — git bisect good or git bisect bad. It halves the range each time.; Read the answer — Git names the first bad commit. Then git bisect reset.. log₂(n) steps: 1,000 commits is ten tests. The hard part is writing a reliable one-line test.
Who is the Git Bisect poster for?
Git Bisect belongs to the Computing section rather than to a school year, because computing is not something one grade owns. Anyone learning tools can pin it up — a beginner, a student mid-course, or someone revising years later.
When should you use the Git Bisect poster?
Ten commits take four steps. A thousand take ten. It is always worth it. A wall chart earns its place by being glanceable from where the work is happening, so Git Bisect belongs on the wall where that computing work actually happens, within glancing distance, rather than filed away.
What other posters go with Git Bisect?
Code Review, Debugging Method and Docker Basics sit alongside Git Bisect in the Computing section. Printed together they make a wall rather than a single sheet, which is how a reference set actually gets used.Code ReviewDebugging MethodDocker Basics
Is the Git Bisect poster free to download and print?
Yes. Git Bisect downloads as a free PDF with no account, no email and no watermark, like everything else in the Computing section. Print as many copies as you like for a home, a classroom, a library or a tutoring group; reselling the file is the only thing the licence rules out.Read the licence
What size does the Git Bisect poster print at?
Git Bisect is a vector PDF laid out for US Letter, and prints on A4 with Fit to page — the same file, no separate download. Because every mark on it is drawn rather than photographed, it stays sharp enlarged to A3, A2 or A1 at a copy shop. Colour carries emphasis only, so a greyscale print of Git Bisect loses nothing.Printing guide

Related posters

Charts that sit alongside Git Bisect on the same wall.

Browse every Computing poster, or start from the full catalogue.