--》 git push

Counting objects: 81, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (50/50), done.
^Citing objects:  64% (52/81), 1.96 MiB | 75.00 KiB/s

 

此错表示提交的文件超过git接收文件上限。此时是已经取消不了,只能回滚到前版本再次提交。

git log

git push错误,如何回滚

查看提交的版本,找到版本号进行回滚。

回滚命令:git reset

git reset 39c0f90786c76590e546e3814382b1156ccb4208

--mixed 会保留源码,只是将git commit和index 信息回退到了某个版本.
--soft 保留源码,只回退到commit信息到某个版本.不涉及index的回退,如果还需要提交,直接 commit即可.
--hard 源码也会回退到某个版本,commit和index 都会回退到某个版本.(注意,这种方式是改变本地代码仓库源码)

 

相关文章:

  • 2021-08-15
  • 2022-12-23
  • 2021-05-24
  • 2021-07-24
  • 2021-11-28
  • 2021-12-24
  • 2022-12-23
  • 2021-11-08
猜你喜欢
  • 2021-06-21
  • 2022-01-07
  • 2022-12-23
  • 2022-02-10
  • 2021-11-09
  • 2021-08-07
  • 2022-12-23
相关资源
相似解决方案