I found these instructions from https://www.reddit.com/r/ObsidianMD/comments/qbvqft/obsidian_git/.
- Navigate to the Obsidian folder. You should see other git folders inside.
- Create a new git repo.
gh repo create <repo name> --private
- Set the remote repository as upstream.
git push --set-upstream origin main
- Stage, commit, and push.
git add . && git commit -m "initial commit" && git push
- Open Obsidian.
- Open the Command Palette.
- Create a backup with Obsidian Git.
- You should see your repo in GitHub!