Skip to content

Commit d0d43d6

Browse files
committed
Improve commands
1 parent 9281fb3 commit d0d43d6

46 files changed

Lines changed: 1437 additions & 309 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/commands/gh-at.md

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,102 @@
11
# TAGLINE
22

3-
view mentions across GitHub issues, PRs, and comments
3+
Download and verify artifact attestations (alias for gh attestation)
44

55
# TLDR
66

7-
**Show user mentions**
7+
**Verify an artifact** against a repository's attestations
88

9-
```gh at```
9+
```gh at verify [example.bin] --repo [owner/repo]```
1010

11-
**Show with limit**
11+
**Verify an artifact** against an organization's attestations
1212

13-
```gh at --limit [10]```
13+
```gh at verify [example.bin] --owner [org-name]```
14+
15+
**Verify an OCI image**
16+
17+
```gh at verify [oci://image-uri] --owner [org-name]```
18+
19+
**Verify and print full JSON** result
20+
21+
```gh at verify [example.bin] --owner [org-name] --format [json]```
22+
23+
**Download attestations** for offline verification
24+
25+
```gh at download [example.bin] --repo [owner/repo]```
26+
27+
**Output the trusted root** for offline verification
28+
29+
```gh at trusted-root --repo [owner/repo]```
1430

1531
# SYNOPSIS
1632

17-
**gh** **at** [_options_]
33+
**gh at** _command_ [_flags_]
1834

1935
# PARAMETERS
2036

21-
**-L**, **--limit** _num_
22-
> Maximum items.
37+
**verify** [_file-path_ | _oci://image-uri_]
38+
> Verify the integrity and provenance of an artifact using its associated attestations.
39+
40+
**download** [_file-path_ | _oci://image-uri_]
41+
> Download an artifact's attestations for offline use.
42+
43+
**trusted-root**
44+
> Output trusted_root.jsonl contents, for offline verification.
45+
46+
**-o**, **--owner** _string_
47+
> GitHub organization to scope the attestation lookup by.
48+
49+
**-R**, **--repo** _string_
50+
> Repository name in the format _owner/repo_.
51+
52+
# VERIFY FLAGS
53+
54+
**-d**, **--digest-alg** _string_
55+
> Digest algorithm used to compute the artifact's digest: sha256 or sha512 (default sha256).
56+
57+
**--cert-identity** _string_
58+
> Enforce an exact match of the certificate's SubjectAlternativeName.
59+
60+
**-i**, **--cert-identity-regex** _string_
61+
> Enforce a regex match of the certificate's SubjectAlternativeName.
62+
63+
**--cert-oidc-issuer** _string_
64+
> Enforce the OIDC token issuer (default https://token.actions.githubusercontent.com).
65+
66+
**--signer-repo** _string_
67+
> Enforce a match on the signer workflow's repository.
68+
69+
**--signer-workflow** _string_
70+
> Enforce a match on the signer workflow's path.
71+
72+
**-b**, **--bundle** _string_
73+
> Verify using a bundle stored on disk instead of fetching from GitHub.
74+
75+
**--bundle-from-oci**
76+
> Fetch the attestation bundle from the OCI registry instead of GitHub.
77+
78+
**--format** _string_
79+
> Output format; currently only **json** is supported.
80+
81+
**-L**, **--limit** _int_
82+
> Maximum number of attestations to fetch (default 30).
2383
2484
# DESCRIPTION
2585

26-
**gh at** shows where you've been mentioned on GitHub. Displays issues, pull requests, and comments that mention your username.
86+
**gh at** is the built-in alias for **gh attestation**, part of the official **GitHub CLI**. It downloads and verifies build provenance attestations, cryptographically signed records that tie an artifact back to the GitHub repository, commit, and workflow that built it (via Sigstore). It's used to confirm that a downloaded binary, package, or container image genuinely came from the claimed source and build pipeline.
87+
88+
# CAVEATS
89+
90+
Requires either **--owner** or **--repo** to scope the lookup. Verification depends on network access to GitHub and Sigstore's public-good instance unless **--custom-trusted-root** or **--bundle** is used for fully offline verification.
2791

2892
# SEE ALSO
2993

30-
[gh-status](/man/gh-status)(1), [gh](/man/gh)(1)
94+
[gh](/man/gh)(1), [gh-release](/man/gh-release)(1)
95+
96+
# RESOURCES
97+
98+
```[Manual](https://cli.github.com/manual/gh_attestation)```
99+
100+
```[Source code](https://github.com/cli/cli)```
31101

102+
<!-- verified: 2026-07-17 -->

assets/commands/gh-rs.md

Lines changed: 62 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,96 @@
11
# TAGLINE
22

3-
Bulk repository synchronization and cloning extension
3+
View GitHub repository rulesets (alias for gh ruleset)
44

55
# TLDR
66

7-
**Sync all repos**
7+
**List rulesets** for the current repository
88

9-
```gh rs sync```
9+
```gh rs list```
1010

11-
**Sync specific org**
11+
**List rulesets** for a different repository, including inherited ones
1212

13-
```gh rs sync --org [orgname]```
13+
```gh rs list --repo [owner/repo] --parents```
1414

15-
**Clone all repos**
15+
**List organization-wide** rulesets
1616

17-
```gh rs clone --org [orgname]```
17+
```gh rs list --org [org-name]```
1818

19-
**List repos to sync**
19+
**View a specific ruleset** by ID
2020

21-
```gh rs list```
21+
```gh rs view [43]```
22+
23+
**Open a ruleset** in the web browser
24+
25+
```gh rs view [43] --web```
26+
27+
**Check rules** that apply to the current branch
28+
29+
```gh rs check```
30+
31+
**Check rules** that apply to the default branch of another repository
32+
33+
```gh rs check --default --repo [owner/repo]```
2234

2335
# SYNOPSIS
2436

25-
**gh rs** _command_ [_options_]
37+
**gh rs** _command_ [_flags_]
2638

2739
# PARAMETERS
2840

29-
**sync**
30-
> Synchronize repositories.
41+
**list**
42+
> List rulesets for a repository or organization.
3143
32-
**clone**
33-
> Clone multiple repositories.
44+
**view** [_ruleset-id_]
45+
> View information about a ruleset. Prompts interactively if no ID is given.
3446
35-
**list**
36-
> List repositories.
47+
**check** [_branch_]
48+
> View rules that would apply to a given branch. Uses the current branch if none is given.
3749
38-
**--org** _ORGNAME_
39-
> Target organization.
50+
**-R**, **--repo** _[HOST/]OWNER/REPO_
51+
> Select another repository instead of the current one.
4052
41-
**--user** _USERNAME_
42-
> Target user.
53+
# LIST FLAGS
4354

44-
**--concurrency** _N_
45-
> Parallel operations.
55+
**-L**, **--limit** _int_
56+
> Maximum number of rulesets to list (default 30).
4657
47-
**--help**
48-
> Display help information.
58+
**-o**, **--org** _string_
59+
> List organization-wide rulesets. Requires the **admin:org** token scope.
4960
50-
# DESCRIPTION
61+
**-p**, **--parents**
62+
> Include rulesets configured at higher levels that also apply (default true).
5163
52-
**gh rs** (repo-sync) is a GitHub CLI extension for bulk repository operations. It enables synchronizing and cloning multiple repositories from organizations or users in parallel.
64+
**-w**, **--web**
65+
> Open the list of rulesets in the web browser.
5366
54-
The extension is useful for maintaining local copies of many repositories, setting up development environments, or backing up organization code. It handles authentication and rate limiting automatically.
67+
# VIEW/CHECK FLAGS
5568

56-
# CAVEATS
69+
**-o**, **--org** _string_
70+
> Organization name, when the ID given to **view** is an organization-level ruleset.
71+
72+
**--default**
73+
> With **check**, view rules on the repository's default branch.
74+
75+
**-w**, **--web**
76+
> Open the ruleset or branch rules page in the web browser.
77+
78+
# DESCRIPTION
5779

58-
Extension must be installed via **gh extension install**. Bulk operations consume API rate limits. Large clones need sufficient disk space.
80+
**gh rs** is the built-in alias for **gh ruleset**, part of the official **GitHub CLI**. Rulesets let repository and organization admins enforce rules (required reviews, status checks, branch naming, force-push restrictions, etc.) on branches and tags. This command group is read-only: it lists and inspects rulesets and shows which rules apply to a given branch, but does not create or edit rulesets.
5981

60-
# HISTORY
82+
# CAVEATS
6183

62-
gh rs is a community **GitHub CLI extension** that adds bulk repository management capabilities beyond the built-in repo commands.
84+
Read-only: rulesets themselves are created and edited on GitHub.com or via the API, not through **gh ruleset**. Listing organization-wide rulesets with **--org** requires a token with the **admin:org** scope, obtainable via **gh auth refresh -s admin:org**.
6385

6486
# SEE ALSO
6587

66-
[gh](/man/gh)(1), [gh-repo](/man/gh-repo)(1), [gh-extension](/man/gh-extension)(1)
88+
[gh](/man/gh)(1), [gh-repo](/man/gh-repo)(1)
89+
90+
# RESOURCES
91+
92+
```[Manual](https://cli.github.com/manual/gh_ruleset)```
93+
94+
```[Source code](https://github.com/cli/cli)```
95+
96+
<!-- verified: 2026-07-17 -->

assets/commands/git-unpack-file.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,20 @@ Extract blob contents to a temporary file
1414

1515
# DESCRIPTION
1616

17-
**git unpack-file** creates a temporary file with a blob's contents and prints the filename. It is a low-level plumbing command for accessing blob contents outside of the working tree.
17+
**git unpack-file** creates a temporary file with a blob's contents and prints the filename. It is a low-level plumbing command for accessing blob contents outside of the working tree, used internally during merges and by scripts that need direct access to a blob's data.
18+
19+
# CAVEATS
20+
21+
Creates a file named **.merge_file_XXXXXX** in the current directory. Git does not remove it automatically; the caller is responsible for deleting it once done.
1822

1923
# SEE ALSO
2024

2125
[git-cat-file](/man/git-cat-file)(1), [git-hash-object](/man/git-hash-object)(1)
26+
27+
# RESOURCES
28+
29+
```[Documentation](https://git-scm.com/docs/git-unpack-file)```
30+
31+
```[Source code](https://github.com/git/git)```
32+
33+
<!-- verified: 2026-07-17 -->

assets/commands/git-update-index.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Modify index entries for tracked files
2828

2929
```git update-index --remove [file]```
3030

31+
**Read paths to update from stdin**
32+
33+
```find . -name "*.txt" | git update-index --add --stdin```
34+
3135
# SYNOPSIS
3236

3337
**git** **update-index** [_options_] [_files_...]
@@ -53,10 +57,37 @@ Modify index entries for tracked files
5357
> Remove file from index.
5458
5559
**--refresh**
56-
> Refresh stat info.
60+
> Refresh stat info; errors on paths that need updating unless **-q** is given.
61+
62+
**-q**
63+
> Used with **--refresh**: continue quietly even if paths need updating, instead of erroring out.
64+
65+
**--really-refresh**
66+
> Like **--refresh**, but check stat information unconditionally, ignoring the assume-unchanged bit.
67+
68+
**--chmod=(+|-)x**
69+
> Set or unset the executable bit for updated paths.
70+
71+
**--stdin**
72+
> Read list of paths from standard input instead of the command line, one per line (or NUL-separated with **-z**).
73+
74+
**--index-info**
75+
> Read index entries (mode, object, path) from standard input to add, replace, or remove entries directly.
76+
77+
**--cacheinfo** _mode_,_object_,_path_
78+
> Directly insert an entry into the index without needing a corresponding file in the working tree.
5779
58-
**--chmod** _mode_
59-
> Set executable bit.
80+
**-z**
81+
> Use NUL as the line terminator with **--stdin** or **--index-info**.
82+
83+
**--ignore-submodules**
84+
> Skip submodule checks when used with **--refresh**.
85+
86+
**--split-index**, **--no-split-index**
87+
> Enable or disable the split-index feature for large repositories.
88+
89+
**--untracked-cache**, **--no-untracked-cache**
90+
> Enable or disable caching of untracked file information to speed up **git status**.
6091
6192
# DESCRIPTION
6293

@@ -66,4 +97,12 @@ The most common use is the `--assume-unchanged` flag, which tells Git to tempora
6697

6798
# SEE ALSO
6899

69-
[git-add](/man/git-add)(1), [git-rm](/man/git-rm)(1)
100+
[git-add](/man/git-add)(1), [git-rm](/man/git-rm)(1), [git-ls-files](/man/git-ls-files)(1)
101+
102+
# RESOURCES
103+
104+
```[Documentation](https://git-scm.com/docs/git-update-index)```
105+
106+
```[Source code](https://github.com/git/git)```
107+
108+
<!-- verified: 2026-07-17 -->

assets/commands/git-update-ref.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,28 @@ Safely update Git reference values
3939
> Reflog message.
4040
4141
**--stdin**
42-
> Read from stdin.
42+
> Read update instructions (update, create, delete, verify, symref-update, etc.) from standard input, applying them together as one atomic transaction.
43+
44+
**-z**
45+
> Use NUL-terminated arguments with **--stdin** instead of quoted, whitespace-terminated strings.
46+
47+
**--batch-updates**
48+
> With **--stdin**, allow individual updates in the transaction to fail without aborting the others.
4349
4450
# DESCRIPTION
4551

4652
**git update-ref** safely updates ref names stored in the repository. It provides atomic ref updates with optional old value verification, ensuring that a ref is only changed if it currently points to an expected value.
4753

48-
This is a low-level plumbing command used internally by higher-level commands like `git branch` and `git tag`.
54+
This is a low-level plumbing command used internally by higher-level commands like `git branch` and `git tag`. With **--stdin**, multiple ref updates can be batched into a single atomic transaction.
4955

5056
# SEE ALSO
5157

52-
[git-symbolic-ref](/man/git-symbolic-ref)(1), [git-branch](/man/git-branch)(1)
58+
[git-symbolic-ref](/man/git-symbolic-ref)(1), [git-branch](/man/git-branch)(1), [git-tag](/man/git-tag)(1)
59+
60+
# RESOURCES
61+
62+
```[Documentation](https://git-scm.com/docs/git-update-ref)```
63+
64+
```[Source code](https://github.com/git/git)```
65+
66+
<!-- verified: 2026-07-17 -->

assets/commands/git-var.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Display Git logical variables
2020

2121
```git var GIT_COMMITTER_IDENT```
2222

23+
**Show configured pager**
24+
25+
```git var GIT_PAGER```
26+
2327
# SYNOPSIS
2428

2529
**git** **var** [_variable_]
@@ -31,10 +35,20 @@ Display Git logical variables
3135
3236
# DESCRIPTION
3337

34-
**git var** shows Git logical variables such as the configured editor, author identity, and committer identity. These values are determined from environment variables and Git configuration.
38+
**git var** shows Git logical variables such as the configured editor, pager, and author/committer identity. These values are resolved from environment variables and Git configuration, following Git's own lookup order (e.g. `$GIT_EDITOR` falls back to `core.editor`, then `$VISUAL`, then `$EDITOR`).
39+
40+
Other recognized variables include `GIT_SEQUENCE_EDITOR` (editor for `git rebase -i`), `GIT_DEFAULT_BRANCH`, `GIT_SHELL_PATH`, `GIT_ATTR_SYSTEM`/`GIT_ATTR_GLOBAL`, and `GIT_CONFIG_SYSTEM`/`GIT_CONFIG_GLOBAL`.
3541

3642
The command is useful in scripts that need to query Git's resolved settings without parsing config files directly.
3743

3844
# SEE ALSO
3945

40-
[git-config](/man/git-config)(1)
46+
[git-config](/man/git-config)(1), [git-commit](/man/git-commit)(1)
47+
48+
# RESOURCES
49+
50+
```[Documentation](https://git-scm.com/docs/git-var)```
51+
52+
```[Source code](https://github.com/git/git)```
53+
54+
<!-- verified: 2026-07-17 -->

0 commit comments

Comments
 (0)