本地关联的就是github的远程库
来源:互联网 发布:指南针炒股软件官网 编辑:程序博客网 时间:2024/06/10 02:23
问题
Geek Lee@GEEKLEE-PC MINGW64 ~/learngit (master)$ git push -u origin masterfatal: 'origin' does not appear to be a git repositoryfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
解决
Geek Lee@GEEKLEE-PC MINGW64 ~/learngit (master)$ git remote add origin git@github.com:Geek-Lee/learngit.gitGeek Lee@GEEKLEE-PC MINGW64 ~/learngit (master)$ git push origin masterThe authenticity of host 'github.com (192.30.253.113)' can't be established.RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of know n hosts.Counting objects: 20, done.Delta compression using up to 4 threads.Compressing objects: 100% (16/16), done.Writing objects: 100% (20/20), 2.22 KiB | 0 bytes/s, done.Total 20 (delta 5), reused 0 (delta 0)remote: Resolving deltas: 100% (5/5), done.To git@github.com:Geek-Lee/learngit.git * [new branch] master -> masterGeek Lee@GEEKLEE-PC MINGW64 ~/learngit (master)$
之所以为什么加上-u不成功呢?
廖大原话是由于远程库是空的,我们第一次推送master分支时,加上了-u参数,Git不但会把本地的master分支内容推送的远程新的master分支,还会把本地的master分支和远程的master分支关联起来,在以后的推送或者拉取时就可以简化命令。从现在起,只要本地作了提交,就可以通过命令:$ git push origin master把本地master分支的最新修改推送至GitHub,现在,你就拥有了真正的分布式版本库!
我的可能就是原来有东西。
强烈推荐廖雪峰老师的git与github教程,我也是在那里学的,重点是….中文版!生动有趣,通俗易懂。
[廖大的Git教程]
(http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)
0 0
- 本地关联的就是github的远程库
- Git本地仓库关联GitHub远程仓库的一般步骤
- windows如何设置本地git仓库与远程的github关联
- 本地关联github遇到的问题
- git中本地与远程库的关联与取消
- git--本地和远程仓库的关联
- GitHub本地上传项目到远程库的基本流程
- 详解GIT远程库的创建、与本地库关联以及推送内容到远程库
- 如何创建github的repository,并和本地仓库关联
- Git本地仓库与Github远程仓库关联
- Git 创建github远程仓库并关联本地项目
- 本地Git仓库和远程仓库的创建及关联
- git 本地分支与远程分支关联的一种方法
- git本地仓库关联远程仓库的两种方式
- git本地仓库关联远程仓库的两种方式
- 本地Git仓库和远程仓库的创建及关联
- git 本地分支与远程分支关联的一种方法
- 本地Git仓库和远程仓库的创建及关联
- 深入研究java.lang.Class类
- java多线程同步编程
- 鸡兔同笼
- 《软件架构设计》读后感
- 容斥原理专题一
- 本地关联的就是github的远程库
- listview加载性能优化ViewHolder
- 【C++】类型转换
- 第二周项目3(2)-汉诺塔
- 数据结构-树
- Maven中Mysql的jar包
- 足球经理
- mybatis generator自动创建代码及相关问题
- 9/5数组和方法