美文网首页
git删除某个提交之前的所有提交

git删除某个提交之前的所有提交

作者: helphi | 来源:发表于2017-12-11 16:29 被阅读0次
    echo 'base' | git commit-tree bc67bd^{tree}
    git rebase --onto 5f2802 bc67bd #5f2802是上一句指令生成的sha前6位
    git push -f
    

    https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E6%9B%BF%E6%8D%A2

    相关文章

      网友评论

          本文标题:git删除某个提交之前的所有提交

          本文链接:https://www.haomeiwen.com/subject/nroiixtx.html