> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# git_trees_create

> Build one commit's worth of changes across any number of files. Pass `base_tree` as the current commit's tree SHA and list only what changed; each entry takes either `content` (new text) or `sha` (an existing blob), and `delete: true` removes a path. Omitting `base_tree` builds a tree containing *only* these entries, which commits as a deletion of everything else.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://api.github.com/repos/{owner}/{repo}/git/trees"}</code></div>

```python github_git_trees_create.py theme={null}
from charter.packs import github

result = await github.git_trees_create.ainvoke({"owner": ..., "repo": ..., "tree": ...})
```

<Note>
  Requires `repo`, `read:user`.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                         | Type     | Description                                                                              |
  | ------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
  | `owner` <span className="required" title="required">\*</span> | `string` | The account owner of the repository. The name is not case sensitive.                     |
  | `repo` <span className="required" title="required">\*</span>  | `string` | The name of the repository without the `.git` extension. The name is not case sensitive. |
</div>

## Body

<div className="reference-table">
  | Field                                                        | Type                                                        | Description                                                                                                                                                                                                                                                                                                                                   |
  | ------------------------------------------------------------ | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `tree` <span className="required" title="required">\*</span> | [TreeEntry](/charter/charter/packs/github/git/objects#treeentry)\[] | One entry per path being added, changed or removed. <span className="field-constraints">min 1 items; max 100000 items</span>                                                                                                                                                                                                                  |
  | `baseTree`                                                   | `string`                                                    | The SHA1 of an existing Git tree object which will be used as the base for the new tree — normally the `tree.sha` of the commit you are building on. Entries in `tree` overwrite entries with the same path. Omitting it means the new tree contains *only* the entries listed, so a commit on it deletes every other file in the repository. |
</div>
