GitLab回退到某次commit suwua 2022-05-19 790 阅读1分钟 1.查询需要回退的commit记录 $ git log 2.gitlab回退到某次commit git reset --hard commitID\ git reset commitID 其他类似命令: git reset --hard HEAD^ 回退到上个版本\ git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前 3.强制重新提交到远程 $ git push -f