[英]How to I clone a GitHub repo and push it to Gitlab?
我正在嘗試克隆一個 github 回購協議,使用:
$ git remote add upstream https://github.com/.......
但我得到錯誤:
fatal: not a git repository (or any of the parent directories): .git
我使用的格式是:
$ git remote add <choose a remoteID, not "origin"> <URL to GitLab/GitHub/Atlassian/BitBucket>
我試過使用實際的回購 ID:使用元內容中的字符串
<meta content="123456789" name="octolytics-dimension-repository_id" />
在此示例中,存儲庫的 ID 為123456789
。
你在現有的回購協議中嗎? 如果不只是正常使用 git 克隆 repo,例如git clone https://github.com/openwall/john.git
您只能將遙控器添加到現有的本地存儲庫中,您必須先在文件夾中執行git init
以使其成為存儲庫,然后再添加遙控器,但我建議只使用上面的命令克隆它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.