2016-04-26 108 views
0

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

即時通訊使用github,所以,如果你可以的話,如果你能給出具體的指示,那將是非常友善的。

回答

2

是的。

從遙控器

# 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 

enter image description here

+0

即時得到「沒有合併」在gitshell寫這之後添加第二個遙控器和合並分支 –

相關問題