之前自己想远端借助git推了一版代码,但是现在又想撤回之前的版本,怎么做??
已经向远端push代码,但是我又想回退到之前的上一个版本


查看到自己想回退到的版本号 ,然后git reset --hard '版本号'


此时说明本地已经回退到了上一个版本的信息,但是远端还是我错误提交的版本
此时需要我将本地再次提交到远端
然后再git push -f
也可以在pycharm中进行log版本更迭:

然后还是选择reset

选择hard

此时再回到log 。dev会在这个分支上显示

posted @
2019-12-31 16:38
醉醺醺的
阅读(
150)
评论()
编辑
收藏
举报