我试图做一个rebase然后中止。现在我的git目录说(branchname|REBASE-i 1/15)
。所以我查出主人,然后做git branch -D branchname
和git仍然说(branchname|REBASE-i 1/15)
。走出git中的失败rebase
我该如何解决这个问题?我试图git gc
无济于事。
我试图做一个rebase然后中止。现在我的git目录说(branchname|REBASE-i 1/15)
。所以我查出主人,然后做git branch -D branchname
和git仍然说(branchname|REBASE-i 1/15)
。走出git中的失败rebase
我该如何解决这个问题?我试图git gc
无济于事。
您可以再试一次git rebase --abort
。
否则git reset --hard {ref}
将帮助您摆脱困境。
使用git reflog
可以在开始变形之前找到参考点。然后在第二个命令中用它代替{ref},例如git reset --hard 0ac372
不用担心重置命令,您可以在使用相同的命令重新执行重置之前始终回到原来的位置。
你需要告诉git你想中止。
git rebase --abort
这会将您的工作副本恢复到git rebase
之前的状态。