7
7
# Before running this, copy this file to the folder where you want the test repo created,
8
8
# then chmod 555 git-imerge-test-create.sh
9
9
# Running this creates a folder above the script folder
10
- # and creates a file named somefile.md in both the floob branch and "frob " branch.
10
+ # and creates a file named somefile.md in both the master branch and "feature1 " branch.
11
11
# This file is in https://github.com/wilsonmar/git-utilities/git-imerge-test-create.sh
12
12
13
13
14
14
function conflict { # $1=letter $2=cnt number
15
15
x=" $1$2 "
16
16
if [ $x = B2 ]|| [ $x = G7 ]|| [ $x = I9 ]; then
17
- commit " $x frob " $1 frob
18
- commit " $x floob " $2 floob
17
+ commit " $x feature1 " $1 feature1
18
+ commit " $x master " $2 master
19
19
else
20
- commit " $x " $1 frob
21
- commit " $x " $2 floob
20
+ commit " $x " $1 feature1
21
+ commit " $x " $2 master
22
22
fi
23
23
}
24
24
@@ -47,8 +47,8 @@ echo "## Initializing repo with commit and branches:"
47
47
touch somefile.md
48
48
git add somefile.md
49
49
git commit -m" 0"
50
- git branch frob
51
- git branch floob
50
+ git branch feature1
51
+ git branch master
52
52
git branch -avv
53
53
54
54
echo " ## Generating commits in branches:"
@@ -59,20 +59,39 @@ for i in ${letters[@]}; do
59
59
cnt=$(( cnt+ 1 )) # increment
60
60
done
61
61
62
- echo " ## Verifying contents of branch frob and file somefile.md:"
62
+ echo " ## Verifying contents of branch feature1 and file somefile.md:"
63
63
git log --pretty=format:" %h %s %ad" --graph --since=1.days --date=relative;
64
- git checkout frob
64
+ git checkout feature1
65
65
cat somefile.md
66
- echo " ## Verifying contents of branch floob and file somefile.md:"
66
+ echo " ## Verifying contents of branch master and file somefile.md:"
67
67
git log --pretty=format:" %h %s %ad" --graph --since=1.days --date=relative;
68
- git checkout floob
68
+ git checkout master
69
69
cat somefile.md
70
70
git branch -avv
71
71
# ls -al
72
72
# You should now have:
73
- # 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 ' ← floob
73
+ # 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 ' ← master
74
74
# \
75
75
# A -- B -- C --- D --- E --- F --- G --- H --- I ← branch
76
- git checkout frob
77
- git-imerge start --name=NAME --goal=full floob
78
- git imerge diagram --name=NAME
76
+ git checkout feature1
77
+ git-imerge start --name=NAME --goal=full master
78
+ git imerge diagram --name=NAME
79
+ # sed -i "" "s/B2 feature1/B2 master/g" somefile.md
80
+ # awk '{gsub(/pattern/,"replacement")}' file
81
+ # TODO: Remove <<<<<<< HEAD, =======, line, and >>>>>>> 865fba2c721d68aca6486499f5e9cb33f95f5311
82
+ # git add .
83
+ # git commit -m"Fix B2"
84
+ # git imerge continue
85
+
86
+ # TODO: Remove <<<<<<< HEAD, =======, line, and >>>>>>> 865fba2c721d68aca6486499f5e9cb33f95f5311
87
+ # git add .
88
+ # git commit -m"Fix G7"
89
+ # git imerge continue
90
+
91
+ # TODO: Remove <<<<<<< HEAD, =======, line, and >>>>>>> 865fba2c721d68aca6486499f5e9cb33f95f5311
92
+ # git add .
93
+ # git commit -m"Fix I9"
94
+ # git imerge continue
95
+
96
+ # git imerge finish
97
+ # git imerge diagram --name=NAME
0 commit comments