[英]Git: Copy existing repo to new branch
我需要將現有的git存儲庫復制到我嘗試過的現有git存儲庫上的新分支
git branch new_branch
git checkout new_branch
git remote add project url/to/existing/repo
git fetch
但這不起作用,我需要保留提交歷史記錄:)
因此,您只想從回購中獲取所有內容? 去做。
git remote add existing url/to/existing/repo
git fetch existing
然后為您關心的任何事情添加跟蹤分支。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.