-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-test-repo.sh
More file actions
executable file
·59 lines (54 loc) · 1.31 KB
/
Copy pathmake-test-repo.sh
File metadata and controls
executable file
·59 lines (54 loc) · 1.31 KB
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
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "$0")"
rm -rf test-repo || true
# The commit graph currently being used for testing purposes:
#
# * K (k)
# * H
# |\
# * | E
# | | * M (main, m)
# | | |\
# | | | * J
# | | * | L
# | | * | I
# | |/| |
# | | |/
# | | * G
# | * | F
# |/| |
# | |/
# | * D
# * | C
# |/
# * B
# * A
git init --initial-branch k test-repo
cd test-repo
touch a.txt && git add a.txt && git commit -m "A"
touch b.txt && git add b.txt && git commit -m "B"
git branch j
touch c.txt && git add c.txt && git commit -m "C"
git switch j
touch d.txt && git add d.txt && git commit -m "D"
git switch k
git branch m
touch e.txt && git add e.txt && git commit -m "E"
git switch m
git merge j -m "F" && touch f.txt && git add f.txt && git commit --amend --no-edit
git switch j
touch g.txt && git add g.txt && git commit -m "G"
git switch k
git merge m -m "H" && touch h.txt && git add h.txt && git commit --amend --no-edit
git switch m
git merge j -m "I" && touch i.txt && git add i.txt && git commit --amend --no-edit
git switch j
touch j.txt && git add j.txt && git commit -m "J"
git switch k
touch k.txt && git add k.txt && git commit -m "K"
git switch m
touch l.txt && git add l.txt && git commit -m "L"
git merge j -m "M" && touch m.txt && git add m.txt && git commit --amend --no-edit
git branch -d j
git switch -c main