---
title: "Revert a commit in the local repository"
method: POST
path: "/version/revert"
tags: ["versioning"]
---

# Revert a commit in the local repository

`POST /version/revert`

Revert a commit in the local repository.

## Request body

- GitRevertParams
  - `commit` string, required
  - `force` boolean
  - `message` string

## Response `200`

a list of GitRevertResult objects

- CountedGitRevertResult
  - `count` integer — number of items present in the items array
  - `items` GitRevertResult[]
    - `audit` object, required
      - `files` FilesTypeGitCommitSummary
        - `created` string[] — Array of file paths that were created in the commit.
        - `deleted` string[] — Array of file paths that were deleted in the commit.
        - `modified` string[] — Array of file paths that were modified in the commit.
        - `renamed` GitFileRename[] — Array of file rename operations, each containing the original path and the new path.
          - `from` string, required — Original file path before the rename.
          - `to` string, required — New file path after the rename.
      - `group` string
      - `id` string, required
    - `reverted` boolean, required

## Other responses

- `401` — Unauthorized
- `500` — Unexpected error

## Changes

- **2026-03-06** `11df16b26c1d` — 1 breaking, 1 warning, 2 info
  - the `items/items/audit/files/renamed/items/` response's property type/format changed from `string`/`` to `object`/`` for status `200`
  - deleted the `query` request parameter `groupId`
  - added the required property `items/items/audit/files/renamed/items/from` to the response with the `200` status
  - added the required property `items/items/audit/files/renamed/items/to` to the response with the `200` status
- **2025-08-26** `72f306103a82` — 1 warning, 1 info
  - deleted the `query` request parameter `group`
  - added the new optional `query` request parameter `groupId`

[Change history](https://skmtc.dev/criblio/apis/cribl-api-reference/changes/version/revert/post.md)

---

[API](https://skmtc.dev/criblio/apis/cribl-api-reference.md) · [All operations](https://skmtc.dev/criblio/apis/cribl-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/criblio/cribl-api-reference/revisions/11df16b26c1d/schema)
