2016-04-26 96 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写这之后添加第二个遥控器和合并分支 –

相关问题