summaryrefslogtreecommitdiffstats
path: root/test/repos/merge_conflict.sh
blob: 7796cf38aa9089160042b3bd5859a0f5a3b5da07 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/sh
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 feature/cherry-picking

echo "this is file number 1 that I'm going to cherry-pick" > cherrypicking1
echo "this is file number 2 that I'm going to cherry-pick" > cherrypicking2

git add .

git commit -am "first commit freshman year"

echo "this is file number 3 that I'm going to cherry-pick" > cherrypicking3

git add .

git commit -am "second commit subway eat fresh"

echo "this is file number 4 that I'm going to cherry-pick" > cherrypicking4

git add .

git commit -am "third commit fresh"

echo "this is file number 5 that I'm going to cherry-pick" > cherrypicking5

git add .

git commit -am "fourth commit cool"

echo "this is file number 6 that I'm going to cherry-pick" > cherrypicking6

git add .

git commit -am "fifth commit nice"

echo "this is file number 7 that I'm going to cherry-pick" > cherrypicking7

git add .

git commit -am "sixth commit haha"

echo "this is file number 8 that I'm going to cherry-pick" > cherrypicking8

git add .

git commit -am "seventh commit yeah"

echo "this is file number 9 that I'm going to cherry-pick" > cherrypicking9

git add .

git commit -am "eighth commit woo"


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"


# this is for the autostash feature

git checkout -b base_branch

echo "original1\noriginal2\noriginal3" > file
git add file
git commit -m "file"

git checkout -b other_branch

git checkout base_branch

echo "new1\noriginal2\noriginal3" > file
git add file
git commit -m "file changed"

git checkout other_branch

echo "new2\noriginal2\noriginal3" > file