简体   繁体   English

推回到github存储库

[英]pushing back to github repository

I cloned one of my github repository to my office desktop machine using the following command 我使用以下命令将我的一个github存储库克隆到我的办公桌面计算机

git clone git://github.com/indiajoe/MyRepo.git

After making some changes, and commiting it, i wasn't able to push back the changes to repository using the command, 在进行一些更改并提交之后,我无法使用命令将更改推回到存储库,

git push -u orgin master

Following was the error message. 以下是错误消息。

fatal: 'orgin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

I tried to re-enter the address, as shown below. 我试图重新输入地址,如下所示。

git remote rm origin
git remote add origin https://github.com/indiajoe/MyRepo.git

Even after this, i was getting the same error. 即使在此之后,我也遇到了同样的错误。 Output of my git remote -v is 我的git remote -v的输出是

origin  https://github.com/indiajoe/MyRepo.git (fetch)
origin  https://github.com/indiajoe/MyRepo.git (push)

What could be going wrong here? 这可能会出错?

PS: While cloning I wasn't able to do via https by the following command PS:克隆时我无法通过以下命令通过https进行

git clone https://github.com/indiajoe/MyRepo.git

But it cloned without any issue with the command, 但它克隆没有任何问题的命令,

git clone git://github.com/indiajoe/MyRepo.git

I don't know, why this happened. 我不知道,为什么会这样。 but could this be a related issue? 但这可能是一个相关问题吗?

git push -u `orgin` `master`

That shouldn't work: it is ' origin ', not ' orgin ' ;) 这应该不起作用:它是' origin ', 而不是 ' orgin ';)

So, by default, this should work: 所以,默认情况下,这应该工作:

git push -u origin master

(as I detail in " Why do I need to explicitly push a new branch? ") (正如我在“ 为什么需要明确推送新分支? ”中详细说明的那样

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM