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, work items, 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, work items, 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, work items, 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, its project's description, topics and the opening of its README |
29| **Code** | The file names and contents of every repository's default branch |
30| **Work items** | Work item titles and descriptions, in each workspace |
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, work items, 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. A work item matches when the repository is linked to it, in any role | Repositories, code, work items, pull requests |
65| `org:acme` or `workspace:acme` | One workspace | Repositories, code, work items, 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:item` (or `is:items`), `is:pr` | Only work items, or only pull requests | Work items, pull requests |
69| `is:open`, `is:closed` | Work items and pull requests by state | Work items, 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, work items, pull requests |
72| `author:ana` | Opened by someone. What g1t opened is `author:g1t`, and shows who it was for | Work items, pull requests |
73| `label:bug` | With a label. Quote a label with spaces: `label:"good first issue"` | Work items, pull requests |
74| `type:code` | Which tab to open: `repositories`, `code`, `items`, `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 Work items,
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:item 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, topics and README | When it is created or its settings change, and on every push to its default branch |
97| A repository's description, which is its project's | When the project's name or description changes |
98| Code | On every push to the default branch: only the files the push changed |
99| Work items and pull requests | When they are opened, edited, assigned, closed, reopened, marked ready or merged; a work item also when a repository is linked to it or unlinked |
100| People and workspaces | When an account or a workspace is made, or its name, description or avatar changes |
101
102Code is indexed from default branches only. Some files are left out:
103
104- vendored and generated directories, such as `node_modules`, `vendor`,
105 `third_party`, `dist`, `target` and `.next`;
106- lockfiles, such as `package-lock.json`, `pnpm-lock.yaml`, `Cargo.lock`
107 and `go.sum`;
108- binary files (images, fonts, archives, compiled code) and minified files;
109- files larger than 512 KB.
110
111A push that changes more than 300 files has the whole default branch
112compared instead, and files are read a few dozen at a time in the
113background, so very large pushes appear in search over a few minutes. A
114repository's first 5,000 files are indexed.
115
116Set a repository's **topics** in **Settings → Repository**. Topics show on
117the project's page and in search results, and each opens Explore for that
118topic.
119
120## Who sees what
121
122Search shows you exactly what you could open yourself:
123
124- Public repositories, and their code and pull requests, are shown to
125 everyone, signed in or not.
126- Private repositories, and their code and pull requests, are shown only
127 to people with a [role](/guides/access-and-roles/) on them, and to the
128 coding agents they connect, which search as them.
129- A work item is shown to the members of its workspace, and to anyone who
130 can read the repository it was filed in (its origin). One filed in a
131 public repository is shown to everyone; one with no origin only to
132 members. See [who sees a work item](/work/work-items/#who-sees-a-work-item).
133- People and workspaces are public, as their pages are. Search never shows
134 which workspaces someone belongs to.
135
136Visibility is checked when you search, against your memberships, the
137roles you were given on repositories, and each repository's visibility as
138they are at that moment, not as they were when something was indexed. A
139repository made private disappears from everyone else's results at once;
140one made public appears in them within moments. Someone removed from a
141workspace, or whose role on a repository is taken away, stops seeing its
142private results on their next search.
143
144## Explore
145
146[Explore](https://g1t.sh/explore) lists public projects only:
147
148| View | Shows |
149| --- | --- |
150| **Recently active** | Projects by their last push to the default branch |
151| **New** | Projects by when they were created |
152| **Languages** | The languages public projects are mostly written in, with how many; choose one to see its projects |
153| **Topics** | The topics public projects have, with how many; choose one to see its projects |
154
155A project's language is the one most of its indexed code is written in,
156leaving out prose and data such as Markdown, JSON and YAML. An
157[archived](/guides/managing-repositories/#archive-a-repository) project is
158still listed, labeled **archived**.
159
160## From the API and agents
161
162The same search is `GET /search` in the API and the `search` tool over
163MCP, whose default action is `code`. It takes `q` (the query), `type` and `page`, and needs no token for
164public results:
165
166```sh
167curl "https://api.g1t.sh/search?q=parse_query+language:rust&type=code"
168```
169
170With a token, private results in your workspaces are included. See
171[Search g1t](/reference/api/search/search/) in the API reference and
172[MCP tools](/reference/mcp/#search).