Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.08 KB

README.md

File metadata and controls

41 lines (34 loc) · 1.08 KB

This is a simple repository for proving how git-bisect works. It assumes you have access to a bash shell.

Installation

  1. Clone or download the repository to your workspace

  2. Run create.sh to create a sample file with a history of good and bad commits:

    bash create.sh

    this creates file.txt with 100 commits, which has 8 good commits, and then a bug is introduced in the 9th commit:

    ...
    6 bug free
    7 bug free
    8 bug free
    9 has a bug
    10 has a bug
    11 has a bug
    ...

Run

  1. Run bisect-run.sh to find the first buggy commit:

    bash bisect-run.sh

    which should display a list of revisions that were tested, ending with:

    07cf7458bf32ae18731612d29b65bcaf4bfd1254 is the first bad commit
    commit 07cf7458bf32ae18731612d29b65bcaf4bfd1254
    Author: Zachary Young <[email protected]>
    Date:   Wed May 15 10:11:12 2019 -0700
    
        Commit 9
    
    :100644 100644 b0ee4696d2880ca74cd727fd9580d97c35a9c99e 1617c5ba91ffed8691ea00e3673efc31570d75a0 M	file.txt