繁体   English   中英

将现有的git repo添加到github.com后,从github.com内部看不到

[英]After adding existing git repo to github.com, not visible from inside github.com

我通过命令将一个本地现有的git repo添加到github.com作为远程

% git remote add origin https://github.com/username/synchm.git

并确认

% git remote -v
origin  https://github.com/username/synchm.git (fetch)
origin  https://github.com/username/synchm.git (push)

但是,当我登录github.com/username时 ,新的存储库不可见,即使在一小时后也不可见。

我试过进去

https://github.com/username/synchm.git

但它重定向到

https://github.com/username/synchm.git

并返回404。

这是怎么回事?

您必须通过github网站创建存储库,然后推送您的本地存储库。

你正在做的只是告诉你的本地git配置origin远程所在的位置。

在github上创建存储库并设置origin远程之后,您仍需要在github上显示之前推送本地分支。 git push origin master (用你当前的分支名称替换master)。

暂无
暂无

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

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