---
title: "Revert commit"
method: POST
path: "/repos/{repo_id}/revert"
tags: ["Repository Commit Manipulation"]
---

# Revert commit

`POST /repos/{repo_id}/revert`

The operation reverts any changes done in the single commit represented by revert_ref_id (compared to its own parent). These opposing changes are then applied into the branch represented by base_id. If any changes were done between revert_ref_id and base_id, they will be checked for conflicts with the revert changes.

## Query parameters

- `base_id` string
- `revert_ref_id` string

## Response `200`

Request completed successfully

## Other responses

- `201` — The revert was completed successfully, and the response contains the new commit ID
- `202` — The revert is in progress. It has merge conflicts requiring active input from the user for conflict resolution. The response contains a merge ID, which can be used for querying /repos/{repo_id}/merges/{merge_id}

---

[API](https://skmtc.net/diversion/apis/diversion-core-api.md) · [All operations](https://skmtc.net/diversion/apis/diversion-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/diversion/diversion-core-api/revisions/38a18aba804b/schema)
