No, git bisect does not support that. You should never but different projects into the same repo. Git does not like or support that. Here’s what you can do despite that:
git bisect
basically has two modes here: the normal mode and the --no-checkout
mode. You can use either of both to achieve your goal in different ways:
- Normal: run
git bisect
and at every step, before you test, you put the correct version of your subprojects in the working tree withgit checkout master -- sub/project/folder
. You might have to undo that after testing befor you can conitnue the bisect. --no-checkout
: rungit bisect start --no-checkout
. Now the steps won’t have any effect on your repo, apart from setting aBISECT_HEAD
reference. Use this reference to check out projectB only:git checkout BISECT_HEAD path/to/projectB
. Now do your test.
I would recommend the --no-checkout
method. And note that while 3lectrologos’ tip did not work, it is still helpful. Giving the path of ProjectB to git bisect
will allow to make use of the fact that errors could only have been introduced at revisions that contain changes to ProjectB.