How to copy an entire GitHub repo to SourceHut

Note for future self on how to successfully cleanly copy an entire git repository from GitHub to SourceHut, with all branches and tags intact.

This is how I did it for wp-cron-pixie:

# on sourcehut, create new repo, then ...
git clone --bare git@github.com:ianmjones/wp-cron-pixie.git
cd wp-cron-pixie.git/
git branch -m master trunk # optional, rename default branch
git push --mirror git@git.sr.ht:~ianmjones/wp-cron-pixie
# on sourcehut, update default branch in repo's settings if not correct.
cd ../
rm -rf wp-cron-pixie.git
git clone git@git.sr.ht:~ianmjones/wp-cron-pixie
cd wp-cron-pixie/
# Check everything is as expected ...
git branch -a
git tag -l
# on github, archive old repo.