github_commit_files
Commit one or more files to a GitHub repository. Prefer the exact owner from github_list_repositories; 'repo' also accepts the combined 'owner/name' form. Creates or updates files in a single atomic commit. Use this to add Dockerfiles, CI workflows, configuration files, etc. Maximum 20 files and 500KB total content per commit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. Also accepts the combined 'owner/name' form. | |
| files | Yes | Files to create or update. Each entry has a 'path' and 'content'. | |
| owner | Yes | Repository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. May be embedded in 'repo' as 'owner/name'. | |
| branch | No | Branch to commit to. Defaults to the repository's default branch. | |
| merge_parent | No | Merge another branch of this repository into 'branch': its name, never a commit id. The commit becomes a true merge commit whose parents are 'branch' and merge_parent, carrying every change merge_parent made since the two diverged with its file modes. 'files' must then resolve every file both sides changed since they diverged, with the complete merged content or as a deletion; the call is refused, naming them, while any is unresolved. Use it to resolve a pull request that conflicts with its base: merge_parent is the base branch and 'branch' the pull request's branch, never the default branch. | |
| commit_message | Yes | Git commit message describing the changes. | |
| confirm_large_deletions | No | Paths from 'files' whose new content is intentionally much shorter than the file it replaces. A commit that would replace an existing file with less than half of its content is refused unless that path is listed here. Leave this out unless a refusal named the path and removing that much is the change you intend. |