我正在嘗試運行 git bisect 來查找損壞的提交,但我遇到的問題是,如果沒有在頂部應用額外的一系列補丁,則損壞并不明顯。我只是從另一個分支中挑選出那些,但我遇到的問題是,在二等分的某些步驟中,它們不能完全應用并且需要進行一些修復。這應該不是問題,但是在進行修復后我似乎無法繼續前進。
所以例如...
$ git bisect start
djrscally@valhalla:$ git bisect bad
djrscally@valhalla:$ git bisect good tags/v5.14-rc7
Bisecting: 13382 revisions left to test after this (roughly 14 steps)
[1ea3615b6168eaaf07445c8d32a4c6bc965d9579] iio: accel: sca3000: Use sign_extend32() instead of opencoding sign extension.
djrscally@valhalla:$ git cherry-pick --no-commit 820aca592e0c^..58915847b332
Auto-merging include/acpi/acpi_bus.h
Auto-merging drivers/acpi/scan.c
Auto-merging drivers/i2c/i2c-core-acpi.c
Auto-merging drivers/regulator/Makefile
CONFLICT (content): Merge conflict in drivers/regulator/Makefile
Auto-merging drivers/regulator/Kconfig
CONFLICT (content): Merge conflict in drivers/regulator/Kconfig
error: could not apply 6a7e459bf029... regulator: Introduce tps68470-regulator driver
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
此時我需要修復drivers/regulator/Makefile和Kconfig;在這一點上,我希望能夠繼續,但我不能:
djrscally@valhalla:$ git add .
djrscally@valhalla:$ git cherry-pick --continue
error: your local changes would be overwritten by cherry-pick.
hint: commit your changes or stash them to proceed.
fatal: cherry-pick failed
Aaaaaaa我現在不確定該怎么做。git cherry-pick --skip似乎重置了早期精選提交中的所有更改。我可以放棄--no-commit,但我不確定 bisect 將如何處理我突然放棄了大量提交而決定將其一分為二的事實。
我該如何處理?
uj5u.com熱心網友回復:
我的第一次嘗試不是反復挑選,而是一次完成整個批次:
git diff 820aca592e0c^..58915847b332 | git apply -3
然后修復沖突,這是最后一步,添加解決方案,您就可以進行測驗了。
這可能是一些手動 rerere'ing 的好地方,你mkdir -p `git rev-parse --git-common-dir`/rr-cache一次告訴 git 你正在使用 rerere 沒有自動化輔助,然后git rerere當你收到沖突通知時,然后修復任何尚未修復的東西,然后git rerere再次修復添加解析度后。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/361020.html
