- Personal Access
<token>for<user>with allrepo[...]access (may need more permissions, depending on the commit) - The
<user>having write/push access to the existing<branch>of the intended<repo>of<org|user> - For creating new commits
- The base64 encoded file content
<base64content>is required. - To update an existing file, the
<sha>hash of the file that's being replaced on GitHub repo is required
- The base64 encoded file content
Creating commits with /contents endpoint come with a limitation (as of APIv3) that it can only create/update a file. Updating multiple files (with a DIFF) doesn't seem to be possible very easily. The SHA sum is only required to update a single file with new contents, not for creating new file.