Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

172 linesCodeBlameRaw
1---
2title: Search and Explore
3description: Search all of g1t at once (repositories, code, issues, pull requests, people and workspaces) with qualifiers, and browse public projects on Explore.
4---
5
6**Search** looks through all of g1t at once: repositories, the code on
7their default branches, issues, pull requests, people and workspaces. It
8covers everything public, and everything private in the workspaces you
9belong to. Signed out, you see public results only.
10
11**Explore**, at [g1t.sh/explore](https://g1t.sh/explore), lists public
12projects: the recently active ones, the new ones, and the ones in a
13language or about a topic.
14
15## Search from anywhere
16
17There are two ways in:
18
19| Where | What it does |
20| --- | --- |
21| **Search or jump to…** at the top of the sidebar, or **⌘K** (Ctrl-K on Windows and Linux) | Opens the command palette. As you type it shows matching repositories, issues, pull requests and people, the pages you can go to, and rows that search all of g1t (the full results at [g1t.sh/search](https://g1t.sh/search)) or only code for what you typed. On a phone, where the sidebar is folded away, the magnifier in the top bar opens it |
22| A project's **Code** page | **Search this repository's code** searches the project's repository, with `repo:` filled in |
23
24The search page has a tab for each kind of result, each with its count:
25
26| Tab | Searches |
27| --- | --- |
28| **Repositories** | Each repository's name, workspace, description, topics and the opening of its README |
29| **Code** | The file names and contents of every repository's default branch |
30| **Issues** | Issue titles and descriptions |
31| **Pull requests** | Pull request titles and descriptions |
32| **People** | Usernames and names of people, and the slugs, names and descriptions of workspaces |
33
34Results show the part that matched, highlighted. A code result shows the
35lines that matched with their line numbers, and each line links to that
36line of the file, at `/<owner>/<repo>/blob/<branch>/<path>#L<line>`. Counts
37stop at 1,000. Results come 20 to a page.
38
39## Writing a query
40
41Words match wherever they appear, in any order. A result has every word
42you type.
43
44| You type | It finds |
45| --- | --- |
46| `merge queue` | Results with both words, anywhere |
47| `"merge queue"` | The two words together, in this order |
48| `parse -legacy` | Results with `parse` and without `legacy` |
49| `pars` | In repositories, issues, pull requests and people, any word that starts with `pars`, such as `parser` |
50| `parse_query(` | In code, that exact run of characters, punctuation and all |
51
52Code is matched as text, the way you would find something in an editor:
53any run of three characters or more, inside words or across them. A code
54search needs at least one word of three characters or more, unless it is
55limited to repositories with `repo:`.
56
57### Qualifiers
58
59Put qualifiers anywhere in the query. Most can be left out with a leading
60`-`, such as `-label:wontfix`.
61
62| Qualifier | Narrows to | Applies to |
63| --- | --- | --- |
64| `repo:owner/name` | One repository. Give it more than once for several | Repositories, code, issues, pull requests |
65| `org:acme` or `workspace:acme` | One workspace | Repositories, code, issues, pull requests |
66| `language:rust` | Code in a language, or repositories mostly written in it. `ts`, `js`, `py` and `cpp` are understood | Repositories, code |
67| `path:src/` | Code whose path contains `src/`. With `*`, a pattern: `path:*.rs`, `path:src/*/mod.rs` | Code |
68| `is:issue`, `is:pr` | Only issues, or only pull requests | Issues, pull requests |
69| `is:open`, `is:closed` | Issues and pull requests by state | Issues, pull requests |
70| `is:merged`, `is:draft` | Pull requests that were merged, or are still drafts | Pull requests |
71| `is:public`, `is:private` | Results from public or private repositories | Repositories, code, issues, pull requests |
72| `author:ana` | Opened by someone. What g1t opened is `author:g1t`, and shows who it was for | Issues, pull requests |
73| `label:bug` | With a label. Quote a label with spaces: `label:"good first issue"` | Issues, pull requests |
74| `type:code` | Which tab to open: `repositories`, `code`, `issues`, `pulls` or `people` | All |
75
76Without a tab or `type:`, the qualifiers choose one: `path:` opens Code,
77`is:pr` opens Pull requests, `is:open`, `author:` or `label:` open Issues,
78and anything else opens Repositories. A qualifier that only one kind of
79result has rules the others out: a query with `path:` finds no people.
80
81Some examples:
82
83```text
84fetchEvents language:typescript path:app/
85"rate limit" org:acme is:issue is:open
86crash author:ana -label:wontfix
87router repo:acme/web repo:acme/api
88```
89
90## What is indexed
91
92Search is kept current as things change:
93
94| What | When it is indexed |
95| --- | --- |
96| A repository's name, description, topics and README | When it is created or its settings change, and on every push to its default branch |
97| Code | On every push to the default branch: only the files the push changed |
98| Issues and pull requests | When they are opened, edited, assigned, closed, reopened, marked ready or merged |
99| People and workspaces | When an account or a workspace is made, or its name, description or avatar changes |
100
101Code is indexed from default branches only. Some files are left out:
102
103- vendored and generated directories, such as `node_modules`, `vendor`,
104 `third_party`, `dist`, `target` and `.next`;
105- lockfiles, such as `package-lock.json`, `pnpm-lock.yaml`, `Cargo.lock`
106 and `go.sum`;
107- binary files (images, fonts, archives, compiled code) and minified files;
108- files larger than 512 KB.
109
110A push that changes more than 300 files has the whole default branch
111compared instead, and files are read a few dozen at a time in the
112background, so very large pushes appear in search over a few minutes. A
113repository's first 5,000 files are indexed.
114
115Set a repository's **topics** in **Settings → Repository**. Topics show on
116the project's page and in search results, and each opens Explore for that
117topic.
118
119## Who sees what
120
121Search shows you exactly what you could open yourself:
122
123- Public repositories, and their code, issues and pull requests, are
124 shown to everyone, signed in or not.
125- Private repositories, and their code, issues and pull requests, are shown
126 only to people with a [role](/guides/access-and-roles/) on them, and to agents working
127 for those people.
128- People and workspaces are public, as their pages are. Search never shows
129 which workspaces someone belongs to.
130
131Visibility is checked when you search, against your memberships, the
132roles you were given on repositories, and each repository's visibility as
133they are at that moment, not as they were when something was indexed. A
134repository made private disappears from everyone else's results at once;
135one made public appears in them within moments. Someone removed from a
136workspace, or whose role on a repository is taken away, stops seeing its
137private results on their next search.
138
139## Explore
140
141[Explore](https://g1t.sh/explore) lists public projects only:
142
143| View | Shows |
144| --- | --- |
145| **Recently active** | Projects by their last push to the default branch |
146| **New** | Projects by when they were created |
147| **Languages** | The languages public projects are mostly written in, with how many; choose one to see its projects |
148| **Topics** | The topics public projects have, with how many; choose one to see its projects |
149
150A project's language is the one most of its indexed code is written in,
151leaving out prose and data such as Markdown, JSON and YAML. An
152[archived](/guides/managing-repositories/#archive-a-repository) project is
153still listed, labeled **archived**.
154
155## From the API and agents
156
157The same search is `GET /search` in the API and the `search` tool over
158MCP, whose default action is `code`. It takes `q` (the query), `type` and `page`, and needs no token for
159public results:
160
161```sh
162curl "https://api.g1t.sh/search?q=parse_query+language:rust&type=code"
163```
164
165With a token, private results in your workspaces are included. g1t's own
166agents can search too, with the token their run is given. See
167[Search g1t](/reference/api/search/search/) in the API reference and
168[MCP tools](/reference/mcp/#search).
169
170`search` looks across all of g1t. To ask about one workspace's catalog,
171docs and memory, use the [context hub](/guides/context-hub/) and the
172`search` tool's `context` action.