Ephemeral branches give you a disposable ref space for preview environments, CI artifacts, and other short-lived workflows. They never sync to GitHub and stay fully isolated from your normal branches, but you can promote them whenever you’re ready. Under the hood they share the same Git objects as your other branches, keeping storage efficient and fetches fast.Documentation Index
Fetch the complete documentation index at: https://code.storage/docs/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Create a dedicated remote by inserting+ephemeral before .git in the repository URL:
Quick start
Push and pull ephemeral branches with standard Git commands:Promotion (ephemeral → default)
Promote an ephemeral branch to your main remote when it’s ready for production:Important notes
- Isolation: Ephemeral branches never overlap with your default branches until you promote them.
- GitHub separation: They remain inside Code Storage—they are not mirrored to GitHub.
- Shared objects: Ephemeral branches reuse existing Git objects for efficient storage.
- REST + Git: Git operations work as usual, and REST endpoints that accept
ephemeralorephemeral_basecan read/write ephemeral refs (for example list/get files, branch diffs, and branch promotion).
SDK Workflows
Create an ephemeral branch
Useephemeral=True when creating commits, reading files, or listing files in the Python SDK (and ephemeral: true in TypeScript).
Branch from an ephemeral base
Useephemeral_base=True when branching off another ephemeral branch (requires base_branch).
Promote an ephemeral branch
Promote an ephemeral branch withpromote_ephemeral_branch() / promoteEphemeralBranch(); omit target_branch to keep the same name.