Table of Contents

  1. Search syntax
  2. Filters

You can search for code on git.sr.ht within your repositories by using the search bar found on the upper left corner of the page.

Heads up: Code search for git.sr.ht is still in development. There are some limitations, its performance may be slow, and we intend to expand it with more features in the future. The search syntax may also change in the future.

Search syntax

Search terms can be modified as follows:

  • -term: negation; don't include matching results
  • (terms...): group terms, for use with other modifiers
  • key:value: filter by "key" using "value". See Filters below.
  • term OR term: logical OR. Logical AND is implicit.

Filters

You can use the following search filters:

Field Aliases Values Description Examples
case: c: yes, no, or auto Matches case-sensitive or insensitive text. case:yes content:"Foo"
content: c: Text (string or regex) Searches content of files. content:"search term"
file: f: Text (string or regex) Searches file names. file:"main.go"
lang: l: Text Filters by programming language. lang:python
regex: Regex pattern Matches content using a regular expression. regex:/foo.*bar/

About this wiki

commit 3a1362cf2e30b0c40030707834b81065280c84ba
Author: Conrad Hoffmann <ch@bitfehler.net>
Date:   2026-06-02T14:43:17+02:00

builds.sr.ht/manifest: submitter: clarify defaults
Clone this wiki ("master" branch)
https://git.sr.ht/~sircmpwn/sr.ht-docs (read-only)
git@git.sr.ht:~sircmpwn/sr.ht-docs (read/write)