$ 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
也可以看到分支的合并情况:
时间: 2024-12-17 16:55:24