git 代码回滚

181 阅读1分钟

首先,非master分支或者非被保护的分支可以跳过第一步

第一步:

找到截图区域,Protected branches,打开Allow force push,整个流程操作完记得关闭 image.png

第二步:

找到要回退的版本 如:b03e69f451f3faceadf48e60a5805192e85057bd (也可取前8位)

git reset --hard b03e69f4

image.png

第三步:

git push origin HEAD --force

image.png