JZ.*_*JZ. 2 git merge commit git-checkout git-branch
我有两个提交:
[branch]: [commit_id]
justin: 94943b74ba273a9f4009
jzbranch: 6070aada7b8a690d410b
Run Code Online (Sandbox Code Playgroud)
如何将两个分支合并到jzbranch中,并解决两者之间的任何差异?
如何将具有特定提交ID的两个Git分支合并到一个分支中?
git checkout jzbranch
git merge [commit_id] jzbranch
Run Code Online (Sandbox Code Playgroud)
要么
git merge [commit_id] 6070aada7b8a690d410b
Run Code Online (Sandbox Code Playgroud)
因为git允许将几个分支/提交合并为一个.
然后运行git mergetool
或简单git status
(在第二种情况下,您将只看到冲突文件,然后您将使用您喜欢的任何编辑器打开这些文件).我更喜欢第二种方式.
在那之后强制进行新的提交