2011-08-24 56 views

回答

5

我如何合并两个的Git分支,具体提交的id,进入一个 分支?

git checkout jzbranch 

git merge [commit_id] jzbranch 

git merge [commit_id] 6070aada7b8a690d410b 

因为git的允许合并几个分支/承诺之一。

然后运行git mergetool或简单git status(在第二种情况下,您只会看到冲突文件,然后用任何你喜欢的编辑器打开这些文件)。我更喜欢第二种方式。

之后,强制使新的承诺

1
  1. 结帐的jzbranch分支
    git checkout jzbranch

  2. 合并在贾斯汀
    git merge justin

  3. 如果有任何冲突,git的合并工具运行后运行git mergetool,使用git commit提交了最终合并。

1
git branch newbranch 6070aada7b8a690d410b 
git checkout newbranch 
git merge 94943b74ba273a9f4009 
相关问题