I can backup my local .git by pushing it to a repository in two steps:
git push --all ~/gitrepo
git push --tags ~/gitrepo
I can back it up
I use Git bundle
git bundle create /tmp/backup.git --all --tags --remotes
You can receive it as if it were a repo:
cd myworktree
git pull /tmp/backup.git
But also see
For complete backup (thing of git-rerere cache, stashes, hooks, configuration files) I suggest using rsync
rsync -hxPavilyzH --stats --delete .git/ backup@remote:/repo/mirror.git/
Alternatively: