16 lines · 368 B · Shell
RawDownload
#!/bin/bashset -eu -o pipefail git init -q git checkout -q --orphan parent1git commit -q --allow-empty -m parent1 git checkout -q --orphan parent2git commit -q --allow-empty -m parent2 git checkout -q -b child parent1git merge -q --allow-unrelated-histories --no-ff -m child parent2 >/dev/null git commit-graph write --no-progress --reachablegit repack -adq