Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 git bisect 我们可以放大在提交之间可能引入问题的时间。
我想知道是否还有一种方法可以让 git 在一次提交中遍历文件(组合),这样您就可以找出哪个文件/部分导致了问题?
拆分提交的推荐方法是使用. 使用rebase 操作切碎您的提交,然后使用 a和一堆s 将新的较小提交插入到索引中。诚然,这不是自动的,但您可以使用大量or或 python 编写脚本。有关更多详细信息,请参阅上面的 SO 链接。git rebase -i $commit_you_want_to_split^editreset HEAD^git addsedawk
git rebase -i $commit_you_want_to_split^
edit
reset HEAD^
git add
sed
awk
一旦你的提交被砍断,你git bisect现在将更加精确。
git bisect
有没有人自动化这个过程?