使用 git log
查看之前 commit 的版本号
git reset --hard 版本号
注意,此命令会导致本地代码版本回退为之前 commit 的代码的版本
覆盖远端的版本信息
git push origin 分知名 --force
mb647eeee548bfc 博主文章分类:Git ©著作权
文章标签 git 版本号 版本回退 文章分类 JavaScript 前端开发
使用 git log
查看之前 commit 的版本号
git reset --hard 版本号
注意,此命令会导致本地代码版本回退为之前 commit 的代码的版本
覆盖远端的版本信息
git push origin 分知名 --force
上一篇:IDEA 提示 Spring Boot Annotion processor not found in classpath 解决办法
下一篇:报错 NoClassDefFoundError: org/apache/http/config/Lookup 的解决方式
git回退commit
在git push的时候,有时候我们会想办法撤销git commit的内容1、
git commit后,如何撤销commit,撤销commit操作
,然后选择”Hard“,点击”Reset“(如果本地代码不需要回滚的话选soft)选择“Reset HEAD”,Reset Type选择Hard,To Commi
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M