Heiphaistos TutorialsHeiphaistosTutorials
🪟Windows🖥️CMD / PowerShell💬Discord🍎macOS🔐Sécurité🐧Linux🌐Réseau💻Programmation🤖Android📦Applications🔥Applications Heiphaistos📦Logiciels📦HeiApps

⚒ Heiphaistos Tutorials

Forge ton savoir informatique.
Tutoriels clairs, sans blabla.

Navigation

  • Accueil
  • Tous les tutoriels
  • Windows
  • Discord

Ressources

  • Flux RSS
  • heiphaistos.org

© 2026 Heiphaistos Tutorials — tuto.heiphaistos.org

Mentions légalesConfidentialitéCGU

Forge ton savoir.

Accueil/Programmation/Git bisect : trouver le commit qui a introduit un bug
💻ProgrammationVidéo

Git bisect : trouver le commit qui a introduit un bug

Utiliser git bisect pour retrouver rapidement, par dichotomie, le commit responsable d'une régression : marquer un commit bon et un mauvais, tester, et automatiser avec git bisect run.

9 octobre 20261 min de lecture
#programmation#git#débogage#bisect
Votre navigateur ne supporte pas la lecture vidéo.
VitesseSous-titres : bouton CC du lecteur

Sommaire

  • Manuel
  • Automatique

Manuel

git bisect start
git bisect bad                 # le commit actuel a le bug
git bisect good v1.1.0         # cette version fonctionnait
# tester, puis :
git bisect good   # ou   git bisect bad   (git bisect skip si impossible à tester)
git bisect reset

Automatique

git bisect run python -m pytest -q tests/test_frais.py

La commande doit renvoyer 0 si c'est bon, autre chose si c'est mauvais. Environ log₂(n) étapes (recherche dichotomique). Ensuite : git show <commit> (explorer l'historique), puis corriger ou revert.

Commentaires

Aucun commentaire pour l'instant. Soyez le premier !

Laisser un commentaire

En envoyant un commentaire, vous acceptez les conditions d'utilisation et la publication de votre pseudo après modération (voir la politique de confidentialité).