Skip to main content

Usage

vibe push [remote] [branch] [options]

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

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

Push to a Specific Branch

vibe push origin feature-branch
Pushes commits to the feature-branch on the remote.

Push and Set Upstream

vibe push -u origin feature-branch
Pushes to feature-branch and sets it as the upstream tracking branch.

Preview Changes

vibe push --dry-run
Shows what would be pushed without actually pushing. Useful for verification.

Push with Build

vibe push --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.
vibe push --force

Delete a Remote Branch

vibe push --delete feature-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

# Create a new branch locally using Git
git checkout -b feature/new-feature

# Make your changes and commit
vibe add .
vibe commit -m "Add new feature"

# Push to the new branch with upstream tracking
vibe push -u origin feature/new-feature

Switch Branches and Push

# Switch to an existing branch
git checkout develop

# Push to that branch
vibe push

Push to a Different Branch

# Push current commits to a specific branch
vibe push origin staging

What Gets Pushed

When you push, VibeHub receives:
ContentIncluded
Commit messageYes
Changed filesYes
File contentsYes
Author informationYes
TimestampYes
Branch informationYes
AI prompts (if captured)Yes

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:
✅ Email authentication successful
Authenticated as: user@example.com
🔐 Checking permissions...
✅ Write permission confirmed
✅ Successfully pushed to VibeHub cloud!

Error Handling

Not Connected

Error: No project connected. Run 'vibe set <project-url>' first.
Solution: Connect to a project with vibe set.

Not Authenticated

Error: Not logged in. Run 'vibe login' first.
Solution: Authenticate with vibe login.

Permission Denied

❌ Push permission denied
You have read-only access to this project.
Solution: Contact the project owner to request write access.

Cannot Delete Default Branch

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

Conflicts

Error: Remote has changes. Pull first or use --force.
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.