[英]How can I migrate the pull requests from one Git Server to another Git Server for a repository?
我正在使用以下命令將存儲庫從一個 Git 服務器遷移到另一個。我能夠移動標簽但無法移動拉取請求。
git clone --bare https://github.forEx.myRepositoryUrl
git remote set-url origin git@github.com:Example/myRepositoryUrl.git
git push --all
git push --標簽
您至少需要獲取存儲這些 PR 分支的pull/
命名空間。
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.forEx.myRepositoryUrl
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
並為您創建本地分支以推送回新的存儲庫。
git fetch
git for-each-ref refs/heads/pull/* --format='%(refname:short)'| \
while read ref; do \
git switch pull/${ref} \
done
但是,這現在可能會傳輸實際的拉取請求項目及其評論和驗證。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.