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

      

    不积小流,无以成江河!记住一万个小时定律!
  • 相关阅读:
    Running OOM killer script for process 32248 for Solr on port 8983
    List删除元素
    Oracle联合主键
    synchronized的四种用法
    数据库 乐观锁与悲观锁
    noip2011普及组 统计单词数
    bzoj3751 noip2014解方程
    汕头市队赛SRM07
    noip2010 导弹拦截&&vijos1810
    noip2009普及组 细胞分裂&&vijos1814
  • 原文地址:https://www.cnblogs.com/Ed-song/p/7986940.html
Copyright © 2011-2022 走看看