0Pricing
Git Advanced: Monorepo, Submodules & Workflows · Ders

Bisect: Hatalı Commit'leri Bulma

Yüzlerce commit arasından bile hatayı ortaya çıkaran tam commit'i belirlemek için git bisect ile geçmişte ikili arama yapın.

Bisect: Hatalı Commit'leri Bulma, CoddyKit'te ücretsiz bir Git Advanced: Monorepo, Submodules & Workflows dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Git Advanced: Monorepo, Submodules & Workflows öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Git Advanced: Monorepo, Submodules & Workflows kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

The Needle in the Haystack

A bug hides somewhere in your last 200 commits. git bisect runs a binary search through history, halving the suspect range with each test.

How Binary Search Helps

Checking 200 commits linearly means 200 tests. Binary search needs only about log2(200) ≈ 8 — bisect narrows the culprit dramatically faster.

Starting a Bisect

Kick off a session with git bisect start. From there Git walks you through marking commits as good or bad.

git bisect start

Marking Good and Bad

Tell Git where the bug exists (bad) and an older commit where it didn't (good). That bounds the search range.

git bisect bad HEAD
git bisect good v1.2.0

Testing Each Checkout

Git checks out the midpoint commit. You test it and report good or bad, and Git picks the next midpoint accordingly.

git bisect good
# or
git bisect bad

Reaching the Culprit

After a few rounds, Git names the first bad commit — its hash, author, and message — the exact change that introduced the bug.

Ending the Session

Always finish with git bisect reset. It returns you to your starting branch and clears the bisect state.

git bisect reset

Automating with a Script

If you can test the bug programmatically, git bisect run ./test.sh automates the whole search — exit 0 means good, non-zero means bad.

git bisect run ./test.sh

The Skip Escape Hatch

Hit a commit you can't test (it won't build)? git bisect skip tells Git to try a nearby commit instead.

git bisect skip

Reviewing the Log

git bisect log saves or replays the decisions you made — useful for documenting how you found a bug or resuming a session later.

git bisect log

Best Practices

For reliable bisects: have a clear, reproducible test, keep commits small and atomic, and automate with git bisect run whenever you can.

Quick Check

Test your bisect knowledge.

Recap

Recap: git bisect start, mark good and bad, test each midpoint to halve the range, automate with run, skip the untestable, and reset when done.

Sıkça Sorulan Sorular

“Bisect: Hatalı Commit'leri Bulma” dersi ücretsiz mi?

Evet — “Bisect: Hatalı Commit'leri Bulma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Git Advanced: Monorepo, Submodules & Workflows kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Git Advanced: Monorepo, Submodules & Workflows kursu toplamda 4 dersten oluşur.

“Bisect: Hatalı Commit'leri Bulma” dersinde ne öğreneceğim?

Yüzlerce commit arasından bile hatayı ortaya çıkaran tam commit'i belirlemek için git bisect ile geçmişte ikili arama yapın. Git Advanced: Monorepo, Submodules & Workflows ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

Git Advanced: Monorepo, Submodules & Workflows öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te Git Advanced: Monorepo, Submodules & Workflows, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“Bisect: Hatalı Commit'leri Bulma” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu Git Advanced: Monorepo, Submodules & Workflows dersinde kod yazıp çalıştırabilir miyim?

Evet. Her Git Advanced: Monorepo, Submodules & Workflows dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Etkileşimli Yeniden Tabanlama ve Değişiklikleri Düzeltme
  2. Değişiklikleri Geçici Olarak Saklama ve Seçerek Uygulama
  3. Kurtarma için Reflog
  4. Bisect: Hatalı Commit'leri Bulma
← Git Advanced: Monorepo, Submodules & Workflows Sayfasına Dön