美文网首页
git 回退命令

git 回退命令

作者: 前端蜗牛老师 | 来源:发表于2021-05-31 10:29 被阅读0次

回退命令:

git reset --hard HEAD^ 回退到上个版本

git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前

git reset --hard commit_id 退到/进到 指定commit的sha码

强推到远程:

$ git push origin HEAD --force

相关文章

网友评论

      本文标题:git 回退命令

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