zoukankan      html  css  js  c++  java
  • 将本地的一个新项目上传到GitHub上新建的仓库中去

    转载:

    如何将本地的一个新项目上传到GitHub上新建的仓库中去

    踩过的坑:

    1.在git push时报错 error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054

    解决方案:查了很多原因,最后才知道是因为github在内网的情况下网速会很慢,加了翻墙软件成功了

    2.在git commit 的时候提示 

    *** Please tell me who you are.
    
    Run
    
      git config --global user.email "you@example.com"
      git config --global user.name "Your Name"

    然后报错 error: invalid key:

    解决方案:这是一个乌龙面 :我写成了git config you@example.com "you@example.com" 生无可恋 ..........

    注:加上--global表示所有的项目的用户名都是一样的,如果只是单个的配置去掉--global即可

    3. git push时报错fatal: Couldn't find remote ref master

    解决方案:这个是因为没有commit或者是commit没有成功

    4. 连续两次git remote add origin https://github.com/username/projectname.git 报错 fatal: remote origin already exists.

    解决方案:git remote -v 查看是否成功,如果不成功删除掉重新来一次

    git remote -v
    git remote add origin  https://github.com/username/projectname.git
  • 相关阅读:
    pyQt5新手教程 (二)开始你的旅程-编写
    未来写作
    电脑使用问题
    cad学习问题
    chm制作
    github学习之路
    python解决实际问题
    英语学习
    经济学
    通过playgrounds程序学习swift语言及思想
  • 原文地址:https://www.cnblogs.com/sker/p/9299669.html
Copyright © 2011-2022 走看看