Commit file changes to GitHub
github_commit_filesCommit multiple file changes to a GitHub branch in one atomic operation, supporting content updates, in-place edits, deletions, dry-run previews, and optional branch creation.
Instructions
One atomic commit that adds, updates, edits or deletes several files on a branch (Git Data API); the site's CI/CD then deploys. Per file give exactly one of: content (full replacement; set encoding=base64 for binary), edits (in-place find/replace against the branch's current file, right for large files such as a 300 KB content bundle), or delete. createBranch=true creates the branch from the default branch first. dryRun previews sizes, changed-line counts and whether each edit matches exactly once, without committing.
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'. | |
| dryRun | No | Preview only: report each file's action, sizes and changed-line counts (edits are validated) without committing. | |
| message | Yes | Commit message in the repository's conventions. | |
| createBranch | No | If true, create `branch` from the repo's default branch when it does not exist yet. |