Push changes to Overleaf
push_changesPublishes pending local edits to Overleaf as one commit for collaborators. It re-checks remote changes first, refusing conflicting pushes without losing local work.
Instructions
Publish every pending local edit to Overleaf as one commit. This is the only tool that changes the project collaborators see, and the change is immediate and public. Call show_diff first, and compile_project when the edit could break the build. Before pushing, the server re-checks Overleaf and rebases onto whatever collaborators pushed in the meantime. If two edits touch the same lines the push is refused, both versions are reported, and no local work is lost: nothing is overwritten and no winner is chosen. commitMessage labels the one commit made from the pending edits; commits already waiting from an earlier refused push keep their own messages and go out with it. Only the chosen project is pushed. Returns the new commit hash and the diff that was published, or reports that there was nothing to push.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| commitMessage | Yes | Message describing the change, shown in the project's Overleaf history. One line, written for a co-author, e.g. "Rewrite Section 4 discussion". |