Skip to content

Instantly share code, notes, and snippets.

@agateau-gg
Created May 31, 2024 12:29
Show Gist options
  • Save agateau-gg/fb092b8e537d38a0975115cbc0171706 to your computer and use it in GitHub Desktop.
Save agateau-gg/fb092b8e537d38a0975115cbc0171706 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
create_commit() {
git commit --allow-empty -m "$1"
}
rm -rf repo
mkdir repo
cd repo
git init
create_commit A
git tag topic_start
create_commit B
create_commit C
git checkout -b topic topic_start
create_commit D
create_commit E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment