撤回提交到 gitlab 上的代码

2022-04-25  本文已影响0人  bestCindy

step1

git log 查看分支上已提交的信息

会有每个提交信息的 commitId

step2

git reset --hard commitId 回退到之前的版本

step3

分支为 branch1

git push origin branch1 --force 覆盖掉远端的版本信息,远端的仓库也会会退到相应的版本

上一篇 下一篇

猜你喜欢

热点阅读