Source: cirosantilli/git-tips/how-to-visualize-the-commit-tree
= How to visualize the commit tree
Generate a minimal test repo. You should get in the habit of doing this to test stuff out.
``
#!/usr/bin/env bash
mkdir git-tips
cd git-tips
git init
for i in 1 2 3 4 5; do
echo $i > f
git add f
git commit -m $i
done
git checkout HEAD~2
git checkout -b my-feature
for i in 6 7; do
echo $i > f
git add f
git commit -m $i
done
``