zoukankan      html  css  js  c++  java
  • 把本地仓库同步到github上去

    1.愚蠢的没有进入之前设定的工作目录就开始用

    git remote add origin https://github.com/bobowa/learngit.git

    这个命令上传,报错如下

    fatal: Not a git repository (or any of the parent directories): .git

    然后看别人说用

    git init

    就可以了,我用了确实没再报错了。然后继续用

    git push -u origin master

    时,有报错。报错如下:

    error: src refspec master does not match any.
    error: failed to push some refs to 'git@github.com:hahaha/ftpmanage.git'

    然后查资料说这是本地仓库为空的意思。解决方法,添加文件;

    然后我意识到问题不对了,因为我之前有add过文件的,而且好多次,然后在git客户端中pwd看了一下路径,果然不是我之前创建的目录。不知道为啥附着在开始页和Win+Q找出来的git客户端打开后的默认目录是不一样的。愚蠢的问题导致我折腾了大半天

  • 相关阅读:
    SQL Server 2012 同步数据
    SQL md5 加密
    构建BootStrap
    js toFixed 真正四舍五入
    Angular BootStrap 登录页面
    Gitblit 安装使用
    js 函数
    git push error HTTP code = 413
    react-native 插件汇总
    js 监听组合键盘事件
  • 原文地址:https://www.cnblogs.com/wangboqi/p/10242152.html
Copyright © 2011-2022 走看看