git-bisect 使用体会

今天试着使用了一下git-bisect,收获颇多。总结一下教训:

1. 不要做git-reset( —hard),它可能会带来一些很严重的错误,比如:

fatal: Untracked working tree file ‘drivers/char/hw_random/virtio-rng.c’ would be overwritten by merge.

这时你只能无奈的重新clone。

2. 一定要找准good的起点,可以通过git-checkout -b来一个个测试寻找。

3. 多利用branch,不仅仅是针对bisect,其它场合也适用。

David Miller用的方法不错,推荐一下。