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

      

    不积小流,无以成江河!记住一万个小时定律!
  • 相关阅读:
    很好的学习idea工具的教程
    事件绑定
    接口出现问题
    IDEA快捷方式
    源代码编译安装Python3.5.2
    CentOS7使用无线网卡
    MySql5.7.12设置log-bin
    报表传递参数控制数据权限
    python将png转为pkm
    WebGL纹理详解——压缩纹理的使用
  • 原文地址:https://www.cnblogs.com/Ed-song/p/7986940.html
Copyright © 2011-2022 走看看