簡體   English   中英

從 github 導入到 gitlab

[英]importing from github to gitlab

I have recently moved my project from github to gitlab using the gitlab import tool which worked fine, but I am having issues to switch from github to gitlab of the local project in git bash. Creating a merge request on gitlab never shows up in git bash, and the.git setup is still connected to github. 如何將導入項目的本地克隆也移動到 gitlab?

使用 git,您可以添加、刪除或修改要連接到存儲庫的遠程存儲庫。

如果您只使用新的 gitlab 存儲庫,您可以使用以下命令更改遠程 URL:

git remote set-url origin <gitlab url> #I'm assuming you are using "origin" as the name of your remote

如果您希望新舊存儲庫都作為遠程存儲庫,請添加一個新存儲庫:

git remote add gitlab <gitlab url>

如果您有兩個(或更多)遙控器,您可以指定在拉取或獲取時使用哪個遙控器:

git fetch origin
git pull gitlab master

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM