git回退到某个版本并提交到服务器

1、查看历史分支

git log

2、找到对应的 commit的版本号

3、执行回退版本命令:git reset --hard  abe021834592f0f2ced42ac29d10a992f15d8007

4、执行查看当前版本的命令,看是否已经回退成功到需要的版本:git rev-parse HEAD 

5、提交到服务器 git push -f

猜你喜欢

转载自blog.csdn.net/qq_29407683/article/details/103021976