Overview
Branches let you work on different features or experiments without affecting your main codebase. VibeHub provides Git-like branching with an intuitive visual interface.Why Use Branches?
- Isolate work - Develop features without affecting stable code
- Collaborate safely - Multiple people can work on different branches
- Experiment freely - Try ideas without risk to your main branch
- Review before merging - Compare and approve changes before they go live
The Branch Selector
The branch selector dropdown appears in your project header. It shows:- Current branch name
- List of all branches
- Option to create new branches
Branch Indicators
| Icon | Meaning |
|---|---|
| Star | Default branch (usually main) |
| Shield | Protected branch |
| Check | Currently selected branch |
Creating a Branch
Your new branch is created from the current branch’s latest commit (HEAD).
Branch Naming Tips
Switching Branches
Click on any branch name in the dropdown to switch to it. When you switch:- The file browser updates to show that branch’s files
- The commit history shows that branch’s commits
- Any new commits you push will go to this branch
The Default Branch
Every project has a default branch (typicallymain). This is:
- The branch shown when someone first opens your project
- Usually represents production-ready code
- Cannot be deleted
- Often protected from direct pushes
Changing the Default Branch
- Go to project Settings
- Find branch management section
- Select a new default branch
Protected Branches
Protected branches have extra safeguards:- Cannot be deleted
- May require reviews before merging
- Indicated with a shield icon
Deleting a Branch
Branches You Can’t Delete
- The default branch
- Protected branches
- The currently selected branch (switch first)
Branch Workflow Example
Here’s a typical workflow using branches:- Start on
mainwith stable code - Create
feature/loginbranch - Make commits on the feature branch
- Meanwhile,
mainmight get other updates - When ready, merge
feature/loginintomain - Delete the feature branch (optional)
Next Steps
Compare Branches
See what’s different between branches
Merge Branches
Combine changes from different branches
