GH-CODESPACE-REBUILD(1)
π GH-CODESPACE-REBUILD β bestie's guide to the rebuild button but make it terminal
okay so you're in the gh manual, specifically the gh-codespace-rebuild page, part of the GitHub CLI manual. yes this is the one that rebuilds your codespace. no we are not panicking. let's go π
β¨ NAME β¨
gh-codespace-rebuild β rebuild a codespace, fr fr it literally rebuilds it π¦
β¨ SYNOPSIS β¨
gh codespace rebuild [flags]
that's it. that's the whole vibe. flags go after, periodt π
β¨ DESCRIPTION β¨
so rebuilding means your codespace gets recreated from scratch β like a glow-up but for your container β¨
the important part, and do not skip this: your code and any current changes will be preserved π«Ά ngl that's the whole reason this command is safe to run. your codespace gets rebuilt using your working directory's dev container, so it matches whatever config you're actually sitting in.
also, a full rebuild (that's the --full flag, more on her below) also removes cached Docker images. yes, all of them. it's giving "clean slate main character energy" π
β¨ OPTIONS β¨
-c,--codespace <string>β the name of the codespace. tell her which one you mean π--fullβ perform a full rebuild π₯ (and remember from up there: full rebuild = cached Docker images get yeeted too)-R,--repo <string>β filter codespace selection by repository name, formatteduser/repoπ--repo-owner <string>β filter codespace selection by repository owner β that's a username or an org, so you can narrow it down before you pick πΈ
β¨ EXIT CODES β¨
like, she'll tell you exactly how it went:
0β successful execution π slay1β error π2β command canceled π (you hit the brakes)4β authentication required π go log in bestie
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. iykyk, always check the help π
β¨ SEE ALSO β¨
gh-codespace(1)β the whole codespace fam, go say hi π§
and that's the page!! you understood the assignment π this was written for GitHub CLI v2.102.0, dated Oct 2026 β so if you're reading this in some other timeline, check your version, ok bye love u π«Άβ
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms