git_restore
Restore a single file in the mirror to its committed version, discarding uncommitted edits, then sync it into Studio.
Instructions
Overwrite one file in the mirror with its committed version: HEAD by default, or an older commit given as source. Uncommitted edits to that file are lost and cannot be recovered, so check git_diff first. The file sync then carries the restored script into Studio. For a file that was deleted use git_recover; for instances checkpointed in the place use restore.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "git_restore"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to the mirror folder, as git_status or git_log prints it, e.g. "ServerScriptService/Main.server.luau". | |
| place | No | Target place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place. | |
| source | No | Commit or ref to take the file from, e.g. a hash or "HEAD~3". Omit to discard uncommitted changes and return to HEAD. |