1 冲突处理
基于同个原始分支后,两个分支同步开发,最后合并:
合并两个分支
# branch1/2可以是分支名,也可以通过指定版本的SHA1 16进制的前7个位
git merge branch1 branch2
解决冲突
通过git diff
来比较两个分支的不同点,手动合并:
# 比较两个分支(默认比较所有的不同)
git diff d02b6ff 919b8ea
# 比较版本d02b6ff和版本919b8ea的common.h文件
# 默认diff
git diff d02b6ff 919b8ea -- api/include/common.h
# 配置好vim diff
git d d02b6ff 919b8e