Skip to content

Instantly share code, notes, and snippets.

@skalnik
Created February 14, 2013 08:54
Show Gist options
  • Save skalnik/4951428 to your computer and use it in GitHub Desktop.
Save skalnik/4951428 to your computer and use it in GitHub Desktop.
A small script that creates a merge conflict
#!/usr/bin/env sh
mkdir merge-conflict
cd merge-conflict
git init
echo 'DevconTLV Yay!' > greeting.txt
git add .
git commit -m 'Initial commit'
git checkout -b conflict
echo 'DevconTLV Woo!' > greeting.txt
git commit -am 'Woo not yay'
git checkout master
echo 'Yay! DevconTLV!' > greeting.txt
git commit -am 'Celebrate first'
echo 'Now cd over and run `git merge conflict`!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment