Skip to main content

Usage

Description

Push your local commits to your VibeHub project in the cloud. This syncs your local changes with the remote repository, including any captured AI prompts.

Arguments

remote
string
Remote name to push to. Defaults to origin.
branch
string
Branch to push. Defaults to the current branch.

Options

-f, --force
boolean
Force push even if there are conflicts. Use with caution.
-d, --dry-run
boolean
Preview what would be pushed without actually pushing.
-p, --project-id
string
Specify a project ID to push to. Useful when working with multiple projects.
-b, --build
boolean
Build the project locally before pushing (runs npm run build).
-u, --set-upstream
boolean
Set upstream tracking for the branch.
--delete
string
Delete a remote branch.

Examples

Basic Push

Pushes all new commits to the current branch on the connected VibeHub project.

Push to a Specific Branch

Pushes commits to the feature-branch on the remote.

Push and Set Upstream

Pushes to feature-branch and sets it as the upstream tracking branch.

Preview Changes

Shows what would be pushed without actually pushing. Useful for verification.

Push with Build

Builds the project locally before pushing, including build output in the push.

Force Push

Force pushing will overwrite remote changes. Make sure you know what you’re doing.

Delete a Remote Branch

Deletes the feature-branch from the remote VibeHub project.
You cannot delete the default branch or protected branches.

Branch Workflow

VibeHub CLI uses Git for local branch management. Here’s a typical workflow:

Create and Push a New Branch

Switch Branches and Push

Push to a Different Branch

What Gets Pushed

When you push, VibeHub receives:

Prerequisites

Before pushing, ensure you have:
  1. Authenticated with vibe login
  2. Initialized your project with vibe init
  3. Connected to a VibeHub project with vibe set <project-url>

Output

A successful push shows:

Error Handling

Not Connected

Solution: Connect to a project with vibe set.

Not Authenticated

Solution: Authenticate with vibe login.

Permission Denied

Solution: Contact the project owner to request write access.

Cannot Delete Default Branch

Solution: You cannot delete the default branch. Choose a different branch to delete.

Conflicts

Solution: Either pull remote changes with vibe pull or force push with --force.

Best Practices

Push often to keep your remote in sync and avoid large uploads.
When unsure, use --dry-run to preview what will be pushed.
Use -u flag when pushing a new branch for the first time.
Force pushing can overwrite others’ work. Use only when necessary.
Run vibe status before pushing to see what will be synced.