Gitea lacks the POST /git/refs endpoint (HTTP 405). Use the branches
API with new_branch_name/old_branch_name; tolerate already-exists.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>