簡體   English   中英

是否可以將bitbucket的“所有分支圖”歷史記錄復制到git中?

[英]Is it possible to copy bitbucket's “all branches graph” history to git?

我想將我的代碼從BitBuket遷移到GitHub,也想將提交歷史記錄遷移到git。

可能嗎?
如果是,怎么辦?

但是,我不知道如何將bitbucket的提交歷史記錄遷移到github

它應該很簡單:

 cd /path/to/local/clone
 git remote add github /url/to/new/empty/GitHub/repo
 git push --mirror github

git push命令--mirror部分應將所有內容 (所有分支/標簽)推送到新的GitHub存儲庫。

我認為您正在尋找的是克隆git存儲庫,以便您的提交歷史記錄和分支保持完整。

git clone --bare https://username@bitbucket.org/username/OLD-PROJECT.git
cd OLD-PROJECT.git
git push --mirror https://github.com/username/NEW-PROJECT.git
cd ..
rm -rf OLD-PROJECT.git

暫無
暫無

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

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