撤销git分叉错误 [英] Undoing a git bisect mistake

查看:147
本文介绍了撤销git分叉错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过命令行进行非自动化的git bisect。一切都很顺利,直到我不小心在我的命令历史记录中出现了错误的回路,而不是运行测试,我运行'git bisect good'(或者不好)。糟糕 - 我不知道这个提交应该标记好还是不好,但这就是我所做的。



我可以撤销'git bisect good'命令,或者让git忘记它的结果,然后返回并运行该提交的测试吗?

解决方案

平分重播

标记修改为好或不好,请发出以下命令以显示到目前为止已完成的工作:

  $ git bisect log 

如果您发现在指定修订状态时出错,可以保存此输出命令添加到文件中,编辑它以删除不正确的条目,然后发出以下命令以返回到已更正的状态:

  $ git bisect reset 
$ git bisect replay that-file


I'm doing a non-automated git bisect via command line. All is going well until I accidentally hit return on the wrong line in my command history, and rather than running the test, I run 'git bisect good' (or bad). Oops - I don't yet know if this commit should be marked good or bad, yet that's what I've done.

Can I undo the 'git bisect good' command, or make git forget the result of it, and go back and run the test for that commit?

解决方案

Bisect log and bisect replay

After having marked revisions as good or bad, issue the following command to show what has been done so far:

$ git bisect log

If you discover that you made a mistake in specifying the status of a revision, you can save the output of this command to a file, edit it to remove the incorrect entries, and then issue the following commands to return to a corrected state:

$ git bisect reset
$ git bisect replay that-file

这篇关于撤销git分叉错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆