---
name: "git-branchless-query"
section: "1"
platform: "linux"
package: "git-branchless"
version: "0.11.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/git-branchless-query"
---

# git-branchless-query(1)

Query the commit graph using the "revset" language and print matching commits

## NAME

query - Query the commit graph using the "revset" language and print matching commits

## SYNOPSIS

**query** \[**--hidden**\] \[**-b**\|**--branches**\] \[**-r**\|**--raw**\] \[**-h**\|**--help**\] \<*REVSET*\>

## DESCRIPTION

Query the commit graph using the "revset" language and print matching commits.

See https://github.com/arxanas/git-branchless/wiki/Reference:-Revsets to learn more about revsets.

The outputted commits are guaranteed to be topologically sorted, with ancestor commits appearing first.

## OPTIONS

- **--hidden**

  Include hidden commits in the results of evaluating revset expressions

- **-b**, **--branches**

  Print the branches attached to the resulting commits, rather than the commits themselves

- **-r**, **--raw**

  Print the OID of each matching commit, one per line. This output is stable for use in scripts

- **-h**, **--help**

  Print help (see a summary with '-h')

- \<*REVSET*\>

  The query to execute
