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

      

    不积小流,无以成江河!记住一万个小时定律!
  • 相关阅读:
    hdu 4115 石头剪子布(2-sat问题)
    AFNetWorking POST Multi-Part Request 上传图片
    左右c++与java中国的垃圾问题的分析与解决
    ACM核武器
    MAX2323E
    cocos2d-x 发动机分析:程序如何开始和结束?
    STL 源代码分析 算法 stl_heap.h
    Android 4.4(KitKat)表格管理子系统
    Swift
    Swift
  • 原文地址:https://www.cnblogs.com/Ed-song/p/7986940.html
Copyright © 2011-2022 走看看