A curl example to help explain this Stack Overflow question related to creating a new branch via the GitHub Git Refs API:
curl -i https://api.github.com/repos/jasonrudolph/sandbox/git/refs/heads/master \
-H "Authorization: token REDACTED"
HTTP/1.1 200 OK
...