Skip to content
GitTree
History and recovery

Use the bisect workflow

Bisect finds the first commit that introduced a problem by halving the history between a commit that has it and one that does not, like git bisect. Select the two commits, test the commit GitTree checks out, mark it Good or Bad, and repeat until it names the First bad commit.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. Tips
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • You know a commit where the problem exists and an older one where it did not, and how to test for it.
  • Commit or stash your changes: bisect checks out commits.

Where to find it

  • Select the two commits in the graph, right-click: Bisect Between These Commits.
ActionmacOSWindows and Linux
Jump to HEAD⌘⇧HCtrl+Shift+H

Steps

  1. Start between two commits

    Select a commit with the problem and an older one without it (Ctrl-click, ⌘-click on a Mac), and choose Bisect Between These Commits. The newer one is treated as bad, the older as good.

  2. Test the checked-out commit

    GitTree checks out a commit halfway and says how many revisions are left to test. Build or run your test.

  3. Mark it

    In the banner choose Good if the problem is absent, Bad if it is there, or Skip if you cannot test this commit.

  4. Read the answer

    When one commit is left, GitTree says First bad commit: with its SHA. Show in Graph selects it.

Expected result

You know exactly which commit introduced the problem; choose End Bisect to return to where you started.

Tips

  • Each step halves what is left: a thousand commits take about ten steps.
  • During bisect you are on a detached HEAD; that is expected.
  • End Bisect always puts you back where you started.

If something goes wrong

Bisect Between These Commits is greyed out

Select exactly two commits, and finish or abort any merge or rebase in progress first.

Questions

What if a commit does not build?

Choose Skip. Git picks a nearby commit instead; the answer may then be a short range rather than one commit.