6.1、解决冲突

$ git merge feature1  快速合并
$ git merge feature1
Auto-merging readme.txt
CONFLICT (content): Merge conflict in readme.txt
Automatic merge failed; fix conflicts and then commit the result.

 Git告诉我们,readme.txt文件存在冲突

git status也可以告诉我们冲突的文件:

 

$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Unmerged paths:
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#       both modified:      readme.txt
#
no changes added to commit (use "git add" and/or "git commit -a"

Git用<<<<<<<=======>>>>>>>标记出不同分支的内容,

 

$ git log --graph --pretty=oneline --abbrev-commit 用带参数的git log也可以看到分支的合并情况:

 

posted @ 2016-01-12 00:10  Mander_Gao  阅读(212)  评论(0编辑  收藏  举报