I'm trying to bisect a bug in the master branch, but the code from my feature branch is needed for my project/test to build.
I've rebased my feature branch against the (buggy) master branch and noticed that a commit from the last few days in master has introduced a bug. When I do git bisect bad
in my feature branch and git bisect good some-commit-in-master-last-week
, git checks out a point in master - but now I can't compile and test if the problem still persists, because the patches in my feature branch are missing.
Can I get git to only revert an individual patch, and then going back to HEAD?
Asked
Active
Viewed 64 times
0

user1273684
- 1,559
- 15
- 24
2 Answers
0
the solution is to run
git diff master feature | patch -p1
after each step.

user1273684
- 1,559
- 15
- 24
0
You can modify the current checked-out commit, at each bisect point, in any way you like; just don't make a new commit from it, and then git reset --hard HEAD
to undo the change after testing. See the example of merging in the hot-fix
branch in the git bisect documentation. This allows fully automated bisect testing (again, see docs).

torek
- 448,244
- 59
- 642
- 775