Geavanceerd Git
Amanda Crawford-Adamo
Software and Data Engineer
Een tool die met binair zoeken de commit vindt die een bug introduceerde
Git Bisect-commando
git bisect
Doel
Start een bisect-sessie
git bisect start
Markeer de huidige staat als slecht
git bisect bad
Markeer de laatst bekende goede staat
git bisect good <commit-hash>

Markeer de commit als slecht
git bisect bad
Markeer de commit als goed
git bisect good

Controleert met een script of de commit goed of fout is.
git bisect run <script_name>

Voorbeeldoutput Git Bisect
$ git log
b1a534f is the first bad commit
commit b1a534f89l2c3d4e5f6g7h8i9j0k1l2m3n4o5p
Author: Jane Doe <[email protected]>
Date: Thu Mar 14 14:30:00 2024 -0500
Update data transformation logic
Stopt de bisect-sessie en gaat terug naar de huidige HEAD
git bisect reset
Use cases
Tips
git bisect run <test-script>Geavanceerd Git