zoukankan      html  css  js  c++  java
  • git did not exit cleanly (exit code 1) 的解决办法

    问题描述:

        关于Git的使用,在通常情况下,习惯于先在本地创建一个本地仓库,然后将项目提交到本地master,再将本地master中的项目Push 到远程仓库中,这样问题就来了。

    具体错误信息如下:

    git.exe push --progress "origin" master


    To https://github.com/Jackson-AndyLau/CMSManager.git
    ! [rejected]        master -> master (non-fast-forward)
    error: failed to push some refs to 'https://github.com/Jackson-AndyLau/CMSManager.git'
    hint: Updates were rejected because the tip of your current branch is behind
    hint: its remote counterpart. Integrate the remote changes (e.g.
    hint: 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.


    git did not exit cleanly (exit code 1) (12359 ms @ 2018-07-01 09:41:24)

    如下图所示:

    解决办法:

        关于这个问题,在网上搜罗了一下,很多工程师都遇到过,解决方法也是五花八门,要不删除一些文件,要不修改一些配置文件,但最终还是未能解决问题。

        后来经过多次的尝试,终于找到了解决办法,这儿分享出来,希望能帮助到你,能少花费些时间去看那些无用的方法!!!

    1、根据错误内容提示,先将远程新建的空仓库 “ Clone ” 到本地,会得到一个空的与远程仓库对应的目录,如下图:

    2、然后将文件提交到master,再Push到远程仓库,发现问题解决了额, 如下图:

    再看远程仓库:


    ————————————————
    版权声明:本文为CSDN博主「csdn-华仔」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/hello_world_qwp/article/details/80872257

  • 相关阅读:
    集训笔记——dp继续
    集训笔记——各种dp(dp杂谈)
    集训笔记——dp
    洛谷P3197 [HNOI2008]越狱 题解
    集训笔记——杂题选讲(图论,dp)
    集训笔记——杂题选讲(带数学推导的递推、递归和dp,卡特兰数)
    滑动窗口+二分--P3957 跳房子
    差分+二分答案--P1083 借教室
    逆序对--P1966 火柴排队
    数位dp--P2657 [SCOI2009] windy 数
  • 原文地址:https://www.cnblogs.com/zhuawang/p/12036757.html
Copyright © 2011-2022 走看看