Skip to Content
New to Genbox? Check out our Getting Started guide

gb push

Push local code changes to a Genbox environment.

Synopsis

gb push [name] [options]

Description

Syncs local code changes to your remote Genbox environment. Uses rsync for efficient incremental transfers.

Arguments

ArgumentDescription
nameOptional. Environment name.

Options

OptionDescription
--app <name>Push specific app only
--restartRestart services after push
--dry-runShow what would be pushed
-w, --watchWatch for changes and auto-push

Examples

Push All Changes

gb push feature-auth

Push Specific App

# Push only API changes gb push feature-auth --app api

Push and Restart

# Push and restart affected services gb push feature-auth --restart

Preview Changes

# See what would be pushed gb push feature-auth --dry-run

Watch Mode

# Auto-push on file changes gb push feature-auth --watch

What Gets Pushed

  • Source files (src/, lib/, etc.)
  • Configuration files
  • Static assets

What’s Excluded

  • node_modules/
  • .git/
  • Build outputs (dist/, .next/)
  • Environment files (.env*)
  • Large binary files

Workflow

  1. Detection: Identifies changed files
  2. Transfer: Syncs changes via rsync over SSH
  3. Hot Reload: Many frameworks auto-reload
  4. Restart: Optional service restart

Watch Mode

Watch mode monitors for file changes:

Watching for changes... [12:34:56] Changed: src/api/users.ts [12:34:56] Pushing 1 file... [12:34:57] Done (0.3s) [12:35:10] Changed: src/api/auth.ts, src/api/middleware.ts [12:35:10] Pushing 2 files... [12:35:11] Done (0.4s)

Notes

  • First push may be slower (full sync)
  • Subsequent pushes are incremental
  • Hot reload works for most frameworks
  • Use --restart if changes aren’t picked up

See Also

Last updated on