#!/bin/sh

rm -rf test-repo/

git init test-repo
cd test-repo
cat > file <<EOF
hello
world
123
test
EOF
echo "Second file 1" > another1
echo "Second file 2" > another2
echo "Just a file" > justafile
git add .
git commit -m "Initial commit"

git checkout -b new
sed -i file -e 's/123/12345/'
git commit -a -m 'Modification one'

git checkout master
sed -i file -e 's/123/54321/'
git commit -a -m 'Modification two'

echo "Third file 1" > thenewfile1
echo "Third file 2" > thenewfile2
rm another1
rm another2
echo "Appended" >> justafile

git merge new
git add thenewfile1
git rm another1

echo "Ready..."
