step1
git log
查看分支上已提交的信息
会有每个提交信息的 commitId
step2
git reset --hard commitId
回退到之前的版本
step3
分支为 branch1
git push origin branch1 --force
覆盖掉远端的版本信息,远端的仓库也会会退到相应的版本
git log
查看分支上已提交的信息
会有每个提交信息的 commitId
git reset --hard commitId
回退到之前的版本
分支为 branch1
git push origin branch1 --force
覆盖掉远端的版本信息,远端的仓库也会会退到相应的版本
本文标题:撤回提交到 gitlab 上的代码
本文链接:https://www.haomeiwen.com/subject/oseqyrtx.html
网友评论