sh Git:创建合并冲突

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Git:创建合并冲突相关的知识,希望对你有一定的参考价值。

#!/bin/bash

mkdir git-merge-test
cd git-merge-test
git init
touch merge.txt
git add merge.txt
echo "this is some content to mess with" > merge.txt
git commit -am 'we are commiting the inital content'
git checkout -b new_branch_to_merge_later
echo "totally different content to merge later" > merge.txt
git commit -am 'edited the content of merge.txt to cause a conflict'
git checkout master
echo "content to append" >> merge.txt
git commit -am"appended content to merge.txt"
git merge new_branch_to_merge_later

以上是关于sh Git:创建合并冲突的主要内容,如果未能解决你的问题,请参考以下文章