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 name to push to. Defaults to
origin.Branch to push. Defaults to the current branch.
Options
Force push even if there are conflicts. Use with caution.
Preview what would be pushed without actually pushing.
Specify a project ID to push to. Useful when working with multiple projects.
Build the project locally before pushing (runs
npm run build).Set upstream tracking for the branch.
Delete a remote branch.
Examples
Basic Push
Push to a Specific Branch
feature-branch on the remote.
Push and Set Upstream
feature-branch and sets it as the upstream tracking branch.
Preview Changes
Push with Build
Force Push
Delete a Remote Branch
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:| Content | Included |
|---|---|
| Commit message | Yes |
| Changed files | Yes |
| File contents | Yes |
| Author information | Yes |
| Timestamp | Yes |
| Branch information | Yes |
| AI prompts (if captured) | Yes |
Prerequisites
Before pushing, ensure you have:- Authenticated with
vibe login - Initialized your project with
vibe init - Connected to a VibeHub project with
vibe set <project-url>
Output
A successful push shows:Error Handling
Not Connected
vibe set.
Not Authenticated
vibe login.
Permission Denied
Cannot Delete Default Branch
Conflicts
vibe pull or force push with --force.
Best Practices
Push Frequently
Push Frequently
Push often to keep your remote in sync and avoid large uploads.
Use Dry Run First
Use Dry Run First
When unsure, use
--dry-run to preview what will be pushed.Set Upstream for New Branches
Set Upstream for New Branches
Use
-u flag when pushing a new branch for the first time.Avoid Force Push
Avoid Force Push
Force pushing can overwrite others’ work. Use only when necessary.
Check Status First
Check Status First
Run
vibe status before pushing to see what will be synced.Related Commands
- vibe pull - Pull changes from VibeHub
- vibe status - Check sync status
- vibe commit - Create a commit
