Created
May 26, 2020 21:29
-
-
Save loncarales/6e8f004e2d7f44144edf81134944a3bd to your computer and use it in GitHub Desktop.
Git: Creating a merge conflict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment