26 lines · 883 B · Shell
RawDownload
#!/bin/bashset -eu -o pipefail export GIT_AUTHOR_DATE="2000-01-01 00:00:00 +0000"export GIT_AUTHOR_EMAIL=author@example.comexport GIT_AUTHOR_NAME=authorexport GIT_COMMITTER_DATE="2000-01-02 00:00:00 +0000"export GIT_COMMITTER_EMAIL=committer@example.comexport GIT_COMMITTER_NAME=committer mkdir -p "$1"cd "$1"git init -qgit config commit.gpgsign false git checkout -q -b commit1git commit -q --allow-empty -m commit1git checkout -q -b commit2 commit1git commit -q --allow-empty -m commit2git checkout -q -b commit3 commit2git commit -q --allow-empty -m commit3 git show-ref -s commit1 | git commit-graph write --no-progress --split=no-merge --stdin-commitsgit show-ref -s commit2 | git commit-graph write --no-progress --split=no-merge --stdin-commitsgit show-ref -s commit3 | git commit-graph write --no-progress --split=no-merge --stdin-commitsgit repack -adq