push_files
Commit multiple files atomically to a GitLab branch in a single commit. Supports create, update, delete, and move actions, with text or base64 encoding, returning the commit result or errors.
Instructions
Push multiple files in a single commit. Use this to commit several file changes atomically; use create_or_update_file when only one path is involved. Each file defaults to action create; optional per-file action (create/update/delete/move) and encoding (text/base64) are additive. GITLAB_PERMISSION_MODE=modify rejects delete and move. The operation writes repository history on the selected branch, requires repository write permission, and returns the commit result or a validation, conflict, or protected-branch error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Array of files to push. Each entry defaults to action 'create'. Per-file fields: action (create/update/delete/move), encoding (text/base64; omitted uses GITLAB_REPO_FILE_ENCODING), previous_path (required for move). Content is required for create and update; omit content for delete, or for a move that should keep the original file. GITLAB_PERMISSION_MODE=modify rejects delete and move. | |
| branch | Yes | Branch to push to | |
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| commit_message | Yes | Commit message |