Atlas › 17 Git & Version Control › Bisect and Cherry-Pick☰ Read as one page
Bisect and Cherry-Pick
5.1Git Bisect: Finding Regressions with Binary SearchWhen a test that used to pass is now failing, git bisect performs a binary search through commit history to find exactly which commit…5.2How Bisect WorksYou tell Git one "good" commit (where the test passed) and one "bad" commit (where the test fails). Git checks out the midpoint and asks…5.3Manual Bisect5.4Automated BisectThe real power of bisect is automation. Give Git a command that exits with 0 (good) or non-zero (bad), and it runs the entire bisect…5.5When to Use BisectBisect is invaluable for QA because it gives you a specific commit, author, and description to reference in your bug report. "This…5.6Cherry-Pick: Targeted Commit ApplicationCherry-pick applies a specific commit from one branch to another without merging the entire branch. It creates a new commit with the same…5.7Common QA Scenarios for Cherry-PickYou fixed a flaky test on develop, but the same test is flaky on the release/2.4 branch.5.8Cherry-Pick Best Practices- Cherry-pick creates a new commit: The original and cherry-picked commits have different hashes. Git does not know they are related…5.9Combining Bisect and Cherry-PickA powerful QA workflow:5.10Hands-On Exercise1. Create a repository with 20+ commits. Intentionally break a test in commit 12. 2. Use git bisect (manual mode) to find the breaking…