zrr*_*ite 10
当您运行时,如果您不想为每次迭代检出一个新的工作树,git bisect您可以将其--no-checkout作为参数提供。
同样为git clone --no-checkout避免基于HEAD克隆后一个工作树。
您可以运行git bisect run my_script arguments有my_script任何你想要做的。
总之:
git clone <repo> --no-checkout
git bisect --no-checkout run my_script arguments
Run Code Online (Sandbox Code Playgroud)
编辑:
根据@phd 的建议,由于 git 的最新版本 (v2.2x),现在支持“部分克隆”,这意味着您可以提供克隆“过滤器”。
在您的情况下,我们将使用--filter=blob:none并且--filter=tree:0仅保留提交对象,但它要求服务器安装一个理解过滤器的 git 版本,否则您将收到警告:
warning: filtering not recognized by server, ignoring
Run Code Online (Sandbox Code Playgroud)
您将要使用的克隆命令:
git clone <repo> --filter=blob:none --filter=tree:0 --no-checkout
Run Code Online (Sandbox Code Playgroud)