Is it possible to create a codespace from a previous pre-build? #180948
Replies: 6 comments
-
|
Short answer: Not directly. GitHub Codespaces doesn’t offer a UI to spin up a new codespace from an older prebuild snapshot. Workarounds:
|
Beta Was this translation helpful? Give feedback.
-
|
Hey! Yeah, you can actually do this, though it's a bit hidden in the UI. Quick way: Go to your repo → Click the green "Code" button The catch: Prebuilds don't stick around forever. GitHub typically keeps them for about 30 days depending on your plan, but they can get cleaned up earlier if you're hitting storage limits. So if your prebuild from a few days ago is gone, you're out of luck. Alternative approach: If you know the exact commit SHA from when things were working fine, you can use the GitHub CLI: gh codespace create --repo owner/repo --ref abc123def Pro tip for next time: If you're doing performance testing regularly, you might want to bump up your prebuild retention settings in your repo settings under Codespaces. That way you'll have more history to work with when hunting down regressions like this. Hope this helps you track down that pesky regression! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for responding! I don't see Commits in the new codespace drowpdown.
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the follow-up! Ah, I see what you mean now. The Codespaces dropdown has changed recently, and yeah, the "Commits" option isn't there anymore in the new UI. What happened: GitHub redesigned the Codespaces creation flow, and some of the quick-access options got moved around or simplified. To open a Codespace on a specific commit: Go to the commit you want (from the commit history) Create a Codespace normally Does that help, or were you looking for something else? |
Beta Was this translation helpful? Give feedback.
-
|
I'm asking my co-worker that's doing this bisect, let me check them them and let you know! |
Beta Was this translation helpful? Give feedback.
-
|
No problem at all! Definitely check with your coworker first - bisect debugging can get pretty involved, and you don't want to step on any toes when they're deep in the middle of tracking things down. Whenever they're ready, just let me know what they find or if they run into any issues. I'm happy to help troubleshoot further or adjust the approach based on what's actually working (or not working) on your end. In the meantime, I'll be here! Good luck with the regression hunt - those can be real brain teasers, but super satisfying once you track them down. 🤞 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
We create several prebuilds a day, and we're trying to identify a regression in performance from the last few days.
Is it possible to create a codespace from an old prebuild from a few days ago?
Beta Was this translation helpful? Give feedback.
All reactions