gitignore
Python script, ASCII text executable
1#!/usr/bin/python3 2 3import subprocess 4 5commits = list(reversed(subprocess.check_output(["git", "log", "--format=%H",]).decode().split())) 6 7for i, commit in enumerate(commits): 8print(f"pushing {commit}") 9print("-" * 48) 10subprocess.run(["git", "push", "origin", f"{commit}:refs/heads/main"]) 11input(f"pushed {i+1}/{len(commits)} commits; push another?") 12 13