目前我有这个复杂的合并提交树:
* 36cd4ff merge commit to rebase 12 (master,origin/master,HEAD)
|\
| * f8d22cf merge commit to rebase 11
| |\
| | * 4381ba4 merge commit to rebase 10
| | |\
| | | * c81227f commit to rebase 9
| * | | d16e5ca commit to rebase 8
* | | | c277df7 good 7
* | | | e712ceb good 6
|/ / /
* | | 80e3baa good 5
* | | 1559030 good 4
|/ /
* | e8bf45c good 3
* | 4ca2d92 good 2
|/
* d43f5ac good 1
我想要这样的东西(用 a 重写干净的历史git push --force
):
* 36cd4ff merge commit to rebase 12
* f8d22cf merge commit to rebase 11
* 4381ba4 merge commit to rebase 10
* c81227f commit to rebase 9
* d16e5ca commit to rebase 8
|
* c277df7 good 7
* e712ceb good 6
* 80e3baa good 5
* 1559030 good 4
* e8bf45c good 3
* 4ca2d92 good 2
* d43f5ac good 1
如果我执行 git rebase -i HEAD~6,只会出现这些提交:
pick 80e3baa good 5
pick e712ceb good 6
pick c277df7 good 7
pick d16e5ca commit to rebase 8
pick c81227f commit to rebase 9
pick 4381ba4 merge commit to rebase 10
这些提交去了哪里?
* f8d22cf merge commit to rebase 11
* f8d22cf merge commit to rebase 11
到目前为止,唯一有效的“解决方案”是克隆存储库并从 开始
c277df7 good 7
,从源存储库复制文件并进行提交。