These are scraps of git commands that I use regularly.
You'll do a git clone $repo..., check branches and find you only have main. Run this command to fetch all branches:
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
Sometimes you just need to boil everything down to a new starting point; for those times:
git reset $(git commit-tree HEAD^{tree} -m "Initial Commit")