[英]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.