summaryrefslogtreecommitdiffstats
path: root/test/repos/merge_conflict.sh
blob: 9a8e9f442f19d56eafcf06e18ed540e8d784a79c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
set -ex; rm -rf repo; mkdir repo; cd repo

git init
git config user.email "test@example.com"
git config user.name "Lazygit Tester"


function add_spacing {
  for i in {1..60}
  do
    echo "..." >> $1
  done
}

mkdir directory
echo "test1" > directory/file
echo "test1" > directory/file2


echo "Here is a story that has been told throuhg the ages" >> file1

git add file1
git add directory
git commit -m "first commit"


git checkout -b develop
echo "once upon a time there was a dog" >> file1
add_spacing file1
echo "once upon a time there was another dog" >> file1
git add file1
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
add_spacing file1
echo "once upon a time there was another cat" >> file1
git add file1
echo "test3" > directory/file
echo "test3" > directory/file2
git add directory
git commit -m "first commit on master"


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