-
查看分支
zhoumengkang@OSX10111-3c15c2ba060a:~/IdeaProjects/php/atatech-org$ git branch develop * newui test
下面将把newui的修改合并到develop分支中去。
-
切换分支
zhoumengkang@OSX10111-3c15c2ba060a:~/IdeaProjects/php/atatech-org$ git checkout develop Switched to branch 'develop' Your branch is up-to-date with 'origin/develop'. -
合并分支
zhoumengkang@OSX10111-3c15c2ba060a:~/IdeaProjects/php/atatech-org$ git merge newui ... Auto-merging xxx.php ... CONFLICT (modify/delete): xxx/ActivityAdd.php deleted in newui and modified in HEAD. Version HEAD of xxx/ActivityAdd.php left in tree. ... Automatic merge failed; fix conflicts and then commit the result. -
查看冲突
zhoumengkang@OSX10111-3c15c2ba060a:~/IdeaProjects/php/atatech-org$ git status On branch develop Your branch is up-to-date with 'origin/develop'. You have unmerged paths. (fix conflicts and run "git commit") Changes to be committed: modified: xxx.md new file: xxx.twig ... Unmerged paths: (use "git add/rm..." as appropriate to mark resolution) both modified: xxx.php deleted by them: xxx.php Untracked files: (use "git add ..." to include in what will be committed) vendor/composer/LICENSE zhoumengkang@OSX10111-3c15c2ba060a:~/IdeaProjects/php/atatech-org$ -
处理冲突
手动修改Unmerged paths的文件,解决冲突,然后在添加到git中。