github

Commit Multiple Files

TOOL
Slug
GITHUB_COMMIT_MULTIPLE_FILES
Version
20261014_00
Toolkit
github
Tool to atomically create, update, or delete multiple files in a GitHub repository as a single commit. Uses Git Data APIs to avoid SHA mismatch conflicts that occur with the Contents API when multiple files are modified in parallel. Use when you need to make multi-file changes re…
reporequired
STRING
Repository name (without .git extension)
force
BOOLEAN
Force update the branch reference. WARNING: Use with caution as this can overwrite commits. Only use this when you intentionally want to overwrite the branch history.
Default: false
ownerrequired
STRING
Repository owner (username or organization name)
author
OBJECT
Git author or committer information.
date
STRING
ISO 8601 timestamp for the commit (optional, defaults to current time)
namerequired
STRING
Name of the author or committer
emailrequired
STRING
Email address of the author or committer
branchrequired
STRING
Target branch name to commit to. If this branch doesn't exist, you MUST provide 'base_branch' to create it. For new feature branches (e.g., 'fix/my-fix', 'feature/new-feature'), always set base_branch='main' (or your default branch).
deletes
ARRAY<STRING>
List of file paths to delete from the repository. Files must exist in the repository; attempting to delete non-existent files will result in an error. Ensure paths are exact with no leading/trailing whitespace.
messagerequired
STRING
Commit message describing the changes
upserts
ARRAY<OBJECT>
List of files to create or update. Each entry requires path, content, and optional encoding (utf-8 or base64)
pathrequired
STRING
File path in the repository (e.g., 'src/main.py' or 'docs/readme.md')
contentrequired
STRING
File content as a string
encoding
STRING
Content encoding: 'utf-8' for text files or 'base64' for binary files
Options: utf-8, base64
Default: "utf-8"
committer
OBJECT
Git author or committer information.
date
STRING
ISO 8601 timestamp for the commit (optional, defaults to current time)
namerequired
STRING
Name of the author or committer
emailrequired
STRING
Email address of the author or committer
base_branch
STRING
REQUIRED when committing to a new branch that doesn't exist yet. Specifies the existing branch to create the new branch from (e.g., 'main' or 'master'). Not needed if 'branch' already exists in the repository.
max_retries
INTEGER
Maximum number of retries when encountering race conditions (422 'not a fast forward' errors). The action will refetch the HEAD and rebase changes on each retry. Set to 0 to disable retries.
Default: 3