1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-14 11:23:09 +02:00
lazygit/test/repos/merge_conflict.sh

86 lines
1.8 KiB
Bash
Raw Normal View History

#!/bin/bash
2018-08-12 07:54:59 +02:00
set -ex; rm -rf repo; mkdir repo; cd repo
git init
git config user.email "test@example.com"
git config user.name "Lazygit Tester"
2018-07-21 09:48:27 +02:00
function add_spacing {
for i in {1..60}
do
echo "..." >> $1
done
}
2018-08-28 11:12:35 +02:00
mkdir directory
echo "test1" > directory/file
echo "test1" > directory/file2
echo "Here is a story that has been told throuhg the ages" >> file1
2018-07-21 09:48:27 +02:00
git add file1
2018-08-28 11:12:35 +02:00
git add directory
git commit -m "first commit"
git checkout -b develop
echo "once upon a time there was a dog" >> file1
2018-07-21 09:48:27 +02:00
add_spacing file1
echo "once upon a time there was another dog" >> file1
git add file1
2018-08-28 11:12:35 +02:00
echo "test2" > directory/file
echo "test2" > directory/file2
git add directory
git commit -m "first commit on develop"
git checkout master
echo "once upon a time there was a cat" >> file1
2018-07-21 09:48:27 +02:00
add_spacing file1
echo "once upon a time there was another cat" >> file1
git add file1
2018-08-28 11:12:35 +02:00
echo "test3" > directory/file
echo "test3" > directory/file2
git add directory
git commit -m "first commit on master"
2018-08-28 11:12:35 +02:00
git checkout develop
echo "once upon a time there was a mouse" >> file3
git add file3
git commit -m "second commit on develop"
git checkout master
echo "once upon a time there was a horse" >> file3
git add file3
git commit -m "second commit on master"
git checkout develop
echo "once upon a time there was a mouse" >> file4
git add file4
git commit -m "third commit on develop"
git checkout master
echo "once upon a time there was a horse" >> file4
git add file4
git commit -m "third commit on master"
git checkout develop
echo "once upon a time there was a mouse" >> file5
git add file5
git commit -m "fourth commit on develop"
git checkout master
echo "once upon a time there was a horse" >> file5
git add file5
git commit -m "fourth commit on master"
# git merge develop # should have a merge conflict here