github 如何合并不同分支

来源:互联网 发布:战舰世界岛风鱼雷数据 编辑:程序博客网 时间:2024/06/06 06:46

From:

http://stackoverflow.com/questions/1123344/merging-between-forks-in-github

 

1. 添加remote original 分支,名字貌似喜欢叫upstream

git remote add upstream git://github.com/octocat/Spoon-Knife.git

2. fetch

git fetch upstream

3. 然后会看到各种versions

From git://github.com/octocat/Spoon-Knife.git * [new branch]      gh-pages   -> upstream/gh-pages * [new branch]      master     -> upstream/master

4. Merge 或者 pull

git merge upstream/master

或者pull

git pull upstream/master
0 0