The new GraphQL mutation
createCommitOnBranch makes it easier to add, update, and delete files in a branch of a repository.
This new API offers a simpler way to commit changes compared to the existing Git database REST APIs. With the new
createCommitOnBranch mutation, you do not need to manually create blobs and trees before creating the commit. This allows you to add, update, or delete multiple files in a single API call.
See the GraphQL API reference for more information on using
createCommitOnBranch. You can also try it in the GraphQL API Explorer! If you need a refresher on how to use the GraphQL API, see our guide.