gitlab中回退代码,CI / CD 联系运维同事处理
时间:12:12:12, commitId: 7b0efexxxx
时间:12:11:11, commitId: 6b0efexxxx
时间:12:10:10, commitId: 5b0efexxxx
问题:master回退代码时,找到最近的一次 commit 的id, SHA值,
git reset 不会有回退记录,在此次之后的记录都会清空,例如要回退 commitId为:6b0efexxxx,那么commitId为 7b0efexxxx 提交的所有记录都会被覆盖。
git reset --hard 6b0efexxxx
回退之后,使用强制推送命令。
git push origin master -f