Skip to content

Instantly share code, notes, and snippets.

@kylemcdonald
Last active December 25, 2015 05:01
Show Gist options
  • Save kylemcdonald/8853ee470441387765fd to your computer and use it in GitHub Desktop.
Save kylemcdonald/8853ee470441387765fd to your computer and use it in GitHub Desktop.
Merry Gitmas.
#!/usr/bin/env bash
max=15
mkdir gitmastree
cd gitmastree
git init -q
for i in `seq 1 $max`; do
git checkout -b $i -q
git commit --allow-empty -m '' --allow-empty-message -q
done
mm=$((max - 1))
for i in `seq $mm 1`; do
j=$((i + 1))
git checkout $i -q
git merge $j --no-ff -m "merry" &> /dev/null
done
git -c color.ui=always log --decorate --oneline --graph | head -n$((max * 2 - 2))
cd ..
rm -rf gitmastree
@dattasaurabh82
Copy link

Merry Christmas to you too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment