二、合并分支出现文件冲突
执行
git switch master
命令 , 切换到 master 主版本分支 ;
然后执行
git merge feature1
命令 , 将 master 分支和 feature1 分支 进行合并 ; 然后执行
git status
命令 , 查看合并后的状态 , 是否有冲突 ;
执行过程 :
D:\Git\git-learning-course>git merge feature1 Auto-merging README.txt CONFLICT (content): Merge conflict in README.txt Automatic merge failed; fix conflicts and then commit the result. D:\Git\git-learning-course> D:\Git\git-learning-course>git status On branch master Your branch is up to date with 'origin/master'. You have unmerged paths. (fix conflicts and run "git commit") (use "git merge --abort" to abort the merge) Unmerged paths: (use "git add <file>..." to mark resolution) both modified: README.txt no changes added to commit (use "git add" and/or "git commit -a") D:\Git\git-learning-course>
出现冲突的文件内容 :
<<<<<<< HEAD master ======= feature1 >>>>>>> feature1