簡體   English   中英

如何將倉庫從gitlab遷移到已具有舊版本倉庫的gihub?

[英]How can I migrate a repo from gitlab to gihub which already has the old version of the repo?

由於某些原因,大約半年前,我們曾經將項目從github遷移到gitlab。 但是,在半年中,我們發現gitlab有很多落后之處,現在想回到github。

問題是該項目的舊版本仍保留在github上 ,我發現的大多數教程都基於在github上創建新的倉庫。 有什么方法可以利用遷移,而無需創建新的回購協議嗎?

如果您已經有一個git repo,則可以將源更改為github並直接推送到那里。

git remote rename origin gitlab # Keep the old reference to gitlab
git remote add origin GITHUB_REPO_URL
git push --tags origin master # (and other branches too)

然后,您可以直接在github上再次工作。

暫無
暫無

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

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