簡體   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