Commit file changes to GitHub
github_commit_filesCommit multiple file changes atomically to a GitHub branch to trigger CI/CD deployment. Supports adding, updating, or deleting files and can create a new branch if required.
Instructions
Create one commit on a branch that adds/updates/deletes several files atomically (Git Data API), then the branch is updated so the site's CI/CD (e.g. Cloudflare Pages) deploys it. Send the full new content of each file; read the current content first with github_get_file and apply your edit locally. Set createBranch to work on a new branch off the default branch instead of committing directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository as 'owner/name', e.g. 'octocat/my-site'. | |
| files | Yes | ||
| branch | Yes | Branch to commit to, e.g. 'main'. | |
| message | Yes | Commit message. Follow the repository's conventions (language, style). | |
| createBranch | No | If true, create `branch` from the repo's default branch when it does not exist yet. |