需要构建功能分支/更高版本的git bisect [英] git bisect with feature branches / later commits are needed to build
问题描述
我试图平分主分支中的一个错误,但是我的功能分支中的代码需要我的项目/测试来构建。
我已经将我的功能分支与(多功能)主分支重新组合,并注意到主人在过去几天的提交引入了一个错误。当我在功能分支中执行 git bisect bad
并且 git bisect good some-commit-in-master-last-week
,git检查master中的一个点 - 但现在我无法编译并测试问题是否仍然存在,因为我的功能分支中的修补程序缺失。
我可以让git只返回一个单独的补丁,然后返回到HEAD吗?
您可以修改以任何你喜欢的方式在每个二等分点执行当前签出的提交;只是不要做一个新的提交,然后 git reset --hard HEAD
在测试之后撤消更改。在 hot-fix 分支中查看合并示例/git-bisect.htmlrel =nofollow> git bisect文档。这允许全自动对分测试(再次参见文档)。
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?
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).
这篇关于需要构建功能分支/更高版本的git bisect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!