簡體   English   中英

將存儲庫合並為分支

[英]Merging repository as branch

是否可以將僅包含一個分支的一個存儲庫合並為另一個分支(並保存所有更改歷史記錄)?

我使用的是github,因此,如果可以的話,如果您能給出具體的指導,那將非常好。

是。

添加第二個遙控器並合並遙控器中的分支

# add remote 
git remote add <remote2> <url2>

# checkout the desired branch (from any remote)
git checkout master

# merge the second remote branch to it
git merge remote2/branch_name

在此處輸入圖片說明

暫無
暫無

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

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