标签: git
我需要从远程分支删除提交。我创建了一个新分支,使用git rebase删除了不需要的提交,但是当我尝试提交基准时,却得到了nothing to commit, working tree clean。
git rebase
nothing to commit, working tree clean
我在做什么错了?
答案 0 :(得分:0)
从 Head 中选择要删除的提交数量,计算该修订级别,然后在 Head 旁边添加下面命令中的 number 位置并在下一步中强制推送。
git reset --hard HEAD~3
git push --force