↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Using git bisect

The article uses a checkout bug as the example for git bisect. The bug appeared in a live page while the same Stripe Checkout code worked on a fresh page, so the problem was in the author’s code rather than in Stripe.

It explains the basic workflow: start the bisect, mark a known bad commit, mark a known good commit, then test each commit that git bisect selects until it identifies the first bad one. In the example, that commit contained JavaScript that listened for click events and prevented the default behavior, which blocked the checkout form from opening.

Reading notes
#

  • git bisect is used when you know one commit where a bug exists and another where it does not.
  • The command moves through the commit range and asks you to classify each tested commit as good or bad.
  • The author found a bug in checkout behavior by using a known working commit from earlier history.
  • In the case described, the introduced change was JavaScript that prevented the checkout form from launching.
  • The article presents git bisect as a practical way to locate regressions in commit history.