push_files
Push one or more files to a GitHub branch in a single commit, automatically creating the branch if it doesn't exist. Files at the same paths are replaced; others are untouched.
Instructions
Commit one or more files to a branch in a single commit and push it — the core write tool. Creates the branch automatically (from base_branch or the default branch) if it doesn't exist. Existing files at the same paths are replaced; other files are untouched. Never force-pushes. File contents must be UTF-8 text. ALWAYS show the user which files and which branch, and get their approval before calling. Prefer a feature branch over pushing directly to the default branch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name (without owner) | |
| files | Yes | Files to create or replace in this commit | |
| owner | No | Repo owner; defaults to GITHUB_DEFAULT_OWNER | |
| branch | Yes | Branch to commit to (created if missing) | |
| message | Yes | Commit message | |
| base_branch | No | Branch to fork from when `branch` doesn't exist yet (default: repo default branch) | |
| delete_paths | No | Paths to delete in the same commit |