美文网首页
本地新建文件夹和github仓库连接 出现问题

本地新建文件夹和github仓库连接 出现问题

作者: 这是这时 | 来源:发表于2019-12-30 00:56 被阅读0次

问题:git add .

$ git add .
fatal: not a git repository (or any of the parent directories): .git

解决:git init


问题:git commit -m '测试'

$ git commit -m '测试'
On branch master
Changes not staged for commit:
        modified:   mockjsdemo (untracked content)
no changes added to commit

解决:git pull --rebase origin master

将两个仓库内容合并,当自己的本地文件夹出现一个README文件,就说明成功了,再进行

git push -u origin master

相关文章

网友评论

      本文标题:本地新建文件夹和github仓库连接 出现问题

      本文链接:https://www.haomeiwen.com/subject/qtzuoctx.html