29 lines · 718 B · Shell
RawDownload
#!/bin/bashset -eu -o pipefail git init -qgit config commit.gpgsign false git checkout -q --orphan rootgit commit -q --allow-empty -m root git checkout -q -b parent1 rootgit commit -q --allow-empty -m parent1 git checkout -q -b parent2 rootgit commit -q --allow-empty -m parent2 git checkout -q -b parent3 rootgit commit -q --allow-empty -m parent3 git checkout -q -b parent4 rootgit commit -q --allow-empty -m parent4 git checkout -q -b three_parents parent1git merge -q -m three_parents --no-ff parent2 parent3 >/dev/null git checkout -q -b four_parents parent2git merge -q -m four_parents --no-ff parent1 parent3 parent4 >/dev/null git commit-graph write --no-progress --reachablegit repack -adq