《GIT push操作报错git did not exit cleanly (exit code 1)及对应解决方案》

向右看齐 2022-06-13 02:42 442阅读 0赞

《GIT push操作报错及对应解决方案总结》

  1. 【报错场景一:git push
  2. 1 如果采用的是界面操作,报错如下:
  3. git did not exit cleanly (exit code 1)
  4. 2 如果采用的是git bash,命令行报错如下:
  5. error: failed to push some refs to 'https://github.com/shiren1118/iOS\_code\_agile.git'
  6. hint: Updates were rejected because the tip of your current branch is behind
  7. hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
  8. hint: before pushing again.
  9. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  10. 解决办法1
  11. 选中待push 的代码文件,鼠标右键唤出Git bash,键入命令:git push -u origin master -f
  12. 注意: 代码分支"master" 可根据实际情况进行更改为push代码的目标分支。
  13. 解决办法2
  14. push之前先pull一把最新代码,在工程根目录下执行git config http.postBuffer 524288000,将push的缓冲区设大一点,默认值比较小。

【特别说明】有任何疑问,请扫描二维码提问:

20180516104442257

发表评论

表情:
评论列表 (有 0 条评论,442人围观)

还没有评论,来说两句吧...

相关阅读