Repository navigation
Visualization of Git History
Bogdan Dit edited this page Oct 14, 2026
·
1 revision
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
commit id: "C4 [main]"
commit id: "C5 [main]"
commit id: "C6 [main]" tag: "main"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2" tag: "task_2_merge"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
commit id: "C4 [main]"
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2" tag: "task_2_merge"
checkout main
merge task_2_merge id: "Merge" tag: "main"
-
NOTE: even though the branch
task_2_mergewas deleted, the branch trace is still present, cluttering the repository history
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
commit id: "C4 [main]"
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge" tag: "main"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge" tag: "main"
checkout task_3_rebase
commit id: "first partial commit for task #3"
commit id: "another partial commit for task three (oops, forgot the traceability)"
commit id: "yet another partial commit for task #3"
commit id: "yet another partial commit for task three (oops, forgot the traceability)"
commit id: "last partial commit for task three (oops, forgot the traceability)" tag: "task_3_rebase"
-
NOTE: all the commits from branch
task_3_rebasewere "copied" (rebased) into themainbranch, cluttering the repository history with multiple commits that contain partial (and incomplete) implementations of the task
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout task_3_rebase
commit id: "first partial commit for task #3"
commit id: "another partial commit for task three (oops, forgot the traceability)"
commit id: "yet another partial commit for task #3"
commit id: "yet another partial commit for task three (oops, forgot the traceability)"
commit id: "last partial commit for task three (oops, forgot the traceability)" tag: "task_3_rebase"
%% to keep the commit ids unique for mermaid,
%% we add a space at the end of the commit id to simulate rebasing
%% in the visualization it will show that the original commit and
%% the rebased (copied) commit have the same message,
%% but mermaid will not complain that the ids are not unique
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) " tag: "main"
-
NOTE: the branch
task_3_rebasewas deleted successfully from the repository, but the five rebased (copied) commits still clutter themainbranch
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) " tag: "main"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) " tag: "main"
checkout task_4_squash
commit id: "first partial commit for task #4"
commit id: "another partial commit for task #4"
commit id: "another partial commit for task four (oops, forgot the traceability)"
commit id: "yet another partial commit for task 4 (without hashtag in front, no traceability will be established)"
commit id: "last partial commit for task #4" tag: "task_4_squash"
-
NOTE: all the commits from branch
task_4_squashwere squashed/compressed/bundled into a single "atomic" commit that was added to themainbranch - NOTE: the squashed commit is represented as a square in the diagram below
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout task_4_squash
commit id: "first partial commit for task #4"
commit id: "another partial commit for task #4"
commit id: "another partial commit for task four (oops, forgot the traceability)"
commit id: "yet another partial commit for task 4 (without hashtag in front, no traceability will be established)"
commit id: "last partial commit for task #4" tag: "task_4_squash"
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT tag: "main"
-
NOTE: the branch
task_4_squashwas deleted successfully from the repository, reducing the repository clutter
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT tag: "main"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
branch task_5_squash_with_link_to_task
checkout main
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT tag: "main"
checkout task_5_squash_with_link_to_task
commit id: "First partial commit for task #5"
commit id: "Second partial commit for task five, but forgot to put the traceability"
commit id: "Also, when working on a branch..."
commit id: "...it is tedious, error-prone and cumbersome to..."
commit id: "...put the traceability to the task (i.e., #5) on every commit."
commit id: "Luckily, with squashing, we do not need..."
commit id: "...to put the traceability on every commit in the branch."
commit id: "Instead, we put the traceability during squashing."
commit id: "Last partial commit for task #5" tag: "task_5_squash_with_link_to_task"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
branch task_5_squash_with_link_to_task
checkout main
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT
checkout task_5_squash_with_link_to_task
commit id: "First partial commit for task #5"
commit id: "Second partial commit for task five, but forgot to put the traceability"
commit id: "Also, when working on a branch..."
commit id: "...it is tedious, error-prone and cumbersome to..."
commit id: "...put the traceability to the task (i.e., #5) on every commit."
commit id: "Luckily, with squashing, we do not need..."
commit id: "...to put the traceability on every commit in the branch."
commit id: "Instead, we put the traceability during squashing."
commit id: "Last partial commit for task #5" tag: "task_5_squash_with_link_to_task"
checkout main
commit id: "Closes #5 (#10)" type: HIGHLIGHT tag: "main"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
branch task_5_squash_with_link_to_task
checkout main
commit id: "C6 [main]"
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT
checkout main
commit id: "Closes #5 (#10)" type: HIGHLIGHT tag: "main"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
branch task_5_squash_with_link_to_task
checkout main
commit id: "C6 [main]"
branch task_6_squash_preferred_project_workflow
checkout main
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT
checkout main
commit id: "Closes #5 (#10)" type: HIGHLIGHT tag: "main"
checkout task_6_squash_preferred_project_workflow
commit id: "First partial commit for task six (without traceability between commit and task)"
commit id: "Second partial commit for task six (without traceability between commit and task)"
commit id: "This is the preferred workflow:"
commit id: "No traceability to the commits in the branch..."
commit id: "...but clear traceability for the squashed commit..."
commit id: "...to the task and PR during integration."
commit id: "Last partial commit for task six (without traceability between commit and task)" tag: "task_6_squash_preferred_project_workflow"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
branch task_5_squash_with_link_to_task
checkout main
commit id: "C6 [main]"
branch task_6_squash_preferred_project_workflow
checkout main
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT
checkout main
commit id: "Closes #5 (#10)" type: HIGHLIGHT
checkout task_6_squash_preferred_project_workflow
commit id: "First partial commit for task six (without traceability between commit and task)"
commit id: "Second partial commit for task six (without traceability between commit and task)"
commit id: "This is the preferred workflow:"
commit id: "No traceability to the commits in the branch..."
commit id: "...but clear traceability for the squashed commit..."
commit id: "...to the task and PR during integration."
commit id: "Last partial commit for task six (without traceability between commit and task)" tag: "task_6_squash_preferred_project_workflow"
checkout main
commit id: "Closes #6 (#11)" type: HIGHLIGHT tag: "main"
---
config:
gitGraph:
showBranches: false
themeVariables:
git0: "#8b949e"
git1: "#1f6feb"
git2: "#cf222e"
git3: "#bf8700"
git4: "#a371f7"
git5: "#2da44e"
---
gitGraph
commit id: "C1 [main]"
commit id: "C2 [main]"
branch task_2_merge
checkout main
commit id: "C3 [main]"
branch task_3_rebase
checkout main
commit id: "C4 [main]"
branch task_4_squash
checkout main
commit id: "C5 [main]"
branch task_5_squash_with_link_to_task
checkout main
commit id: "C6 [main]"
branch task_6_squash_preferred_project_workflow
checkout main
checkout task_2_merge
commit id: "first partial commit for task #2"
commit id: "second partial commit for task #2"
commit id: "third and last partial commit for task #2"
checkout main
merge task_2_merge id: "Merge"
checkout main
commit id: "first partial commit for task #3 "
commit id: "another partial commit for task three (oops, forgot the traceability) "
commit id: "yet another partial commit for task #3 "
commit id: "yet another partial commit for task three (oops, forgot the traceability) "
commit id: "last partial commit for task three (oops, forgot the traceability) "
checkout main
commit id: "Task 4 squash (#9)" type: HIGHLIGHT
checkout main
commit id: "Closes #5 (#10)" type: HIGHLIGHT
checkout main
commit id: "Closes #6 (#11)" type: HIGHLIGHT tag: "main"