Skip to content

Commit c12dfaa

Browse files
committed
Add imerge commands
1 parent 7c523eb commit c12dfaa

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

git-imerge-test-create.sh

100644100755
Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
# Before running this, copy this file to the folder where you want the test repo created,
88
# then chmod 555 git-imerge-test-create.sh
99
# 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.
1111
# This file is in https://github.com/wilsonmar/git-utilities/git-imerge-test-create.sh
1212

1313

1414
function conflict { # $1=letter $2=cnt number
1515
x="$1$2"
1616
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
1919
else
20-
commit "$x" $1 frob
21-
commit "$x" $2 floob
20+
commit "$x" $1 feature1
21+
commit "$x" $2 master
2222
fi
2323
}
2424

@@ -47,8 +47,8 @@ echo "## Initializing repo with commit and branches:"
4747
touch somefile.md
4848
git add somefile.md
4949
git commit -m"0"
50-
git branch frob
51-
git branch floob
50+
git branch feature1
51+
git branch master
5252
git branch -avv
5353

5454
echo "## Generating commits in branches:"
@@ -59,20 +59,39 @@ for i in ${letters[@]}; do
5959
cnt=$((cnt+1)) # increment
6060
done
6161

62-
echo "## Verifying contents of branch frob and file somefile.md:"
62+
echo "## Verifying contents of branch feature1 and file somefile.md:"
6363
git log --pretty=format:"%h %s %ad" --graph --since=1.days --date=relative;
64-
git checkout frob
64+
git checkout feature1
6565
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:"
6767
git log --pretty=format:"%h %s %ad" --graph --since=1.days --date=relative;
68-
git checkout floob
68+
git checkout master
6969
cat somefile.md
7070
git branch -avv
7171
#ls -al
7272
# 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
7474
# \
7575
# 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

Comments
 (0)