---
title: "Squash ref"
method: POST
path: "/api/datasets/{namespace}/{repo}/super-squash/{rev}"
tags: ["datasets"]
---

# Squash ref

`POST /api/datasets/{namespace}/{repo}/super-squash/{rev}`

Squash all commits in the current ref into a single commit with the given message. Action is irreversible.

## Path parameters

- `namespace` string, required
- `repo` string, required
- `rev` string, required

## Request body

- object
  - `message` string

## Response `200`

Response containing the new commit ID after the squash

- object
  - `commitId` string, required — The new commit ID after the squash

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/dae0cc3790f0/schema)
