zoukankan      html  css  js  c++  java
  • 关于在git使用中出现的问题

    问题一:   

         error: failed to push some refs to 'https://github.com/Ed-song/develop-example001.git'

       

    $ git push -u origin master
    Username for 'https://github.com': Ed-song
    To https://github.com/Ed-song/develop-example001.git
     ! [rejected]        master -> master (fetch first)
    error: failed to push some refs to 'https://github.com/Ed-song/develop-example001.git'
    hint: Updates were rejected because the remote contains work that you do
    hint: not have locally. This is usually caused by another repository pushing
    hint: to the same ref. You may want to first integrate the remote changes
    hint: (e.g., 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.

    主要原因: github中的README.md文件不在本地代码目录中

    解决办法:

                    可以通过如下命令进行代码合并【注:pull=fetch+merge]

                    git pull --rebase origin master

                    

    问题二:      

              git does not appear to be a git repository

         解决办法:   删除初始远程地址                

                         $ git remote rm origin

      

    不积小流,无以成江河!记住一万个小时定律!
  • 相关阅读:
    GLSL
    c++ 的垃圾收集(garbage collector
    ZZ 红黑树,并非想象中的那么复杂
    【转载】我心目中的android机器档次
    代码优化
    qqww
    solve Ax+By+C=0
    the c10k problem
    标 题: 腾讯面试题目(PHP程序员)
    zz 软件开发流程工具一览
  • 原文地址:https://www.cnblogs.com/Ed-song/p/7986940.html
Copyright © 2011-2022 走看看