[英]How to copy repo from Bitbucket to CodeCommit with all branches but without history?
[英]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.