Branch Management
Full-featured branch management with visual feedback and drag-and-drop merging.
The Sidebar
The left sidebar organizes your branches:
┌─────────────────────────┐
│ ▼ LOCAL (5) │
│ ├─ main [HEAD]│
│ ├─ develop │
│ └─ feature/ │
│ ├─ login │
│ └─ dashboard │
├─────────────────────────┤
│ ▼ REMOTE (8) │
│ └─ origin/ │
│ ├─ main │
│ ├─ develop │
│ └─ feature/... │
├─────────────────────────┤
│ ▼ STASHES (2) │
│ ├─ WIP: login work │
│ └─ temp save │
└─────────────────────────┘Branch Actions
Checkout (Switch)
Double-click any local branch to switch to it.
Highlight
Single-click any branch to scroll the commit graph to that branch's latest commit.
Create Branch
- Right-click any branch
- Select Branch from...
- Enter new branch name
- GitGUI creates and switches to it
Delete Branch
- Right-click the branch
- Select Delete branch
- Confirm deletion
- Optionally delete from remote
WARNING
Cannot delete the branch you're currently on.
Drag & Drop Merging
The fastest way to merge branches:
- Drag the source branch (with changes you want)
- Drop onto the target branch (where changes should go)
- GitGUI handles the rest
Visual Feedback
- Hover highlight shows the drop target
- Ring indicator confirms valid drop zone
What Happens
- GitGUI switches to target branch (if needed)
- Merges source into target
- Shows success or conflict notification
Context Menu
Right-click any branch for options:
Local Branches
- Branch from... — Create new branch
- Merge into... — Open merge dialog
- Delete branch — Remove the branch
Remote Branches
- Delete remote branch — Remove from server
Merge Dialog
When using Merge into... from context menu:
- Select the target branch
- Confirm the merge
- Handle any conflicts
Handling Conflicts
When a merge has conflicts:
- Warning notification appears
- Conflicted files show in staging panel
- Open files to resolve conflicts
- Stage resolved files
- Commit to complete merge
Remote Branches
Viewing
Remote branches appear under REMOTE, organized by remote name.
Tracking
Checkout a remote branch to create a local tracking branch.
Deleting
Right-click → Delete remote branch to remove from server.
Branch Tree Structure
Branches with / in their names are displayed hierarchically:
feature/loginappears underfeature/folder- Click folders to expand/collapse
- Keeps long branch lists organized
Push and Pull
Push
Ctrl+P — Push current branch to remote
Pull
Ctrl+Shift+P — Pull changes from remote
Status
The status bar shows ahead/behind counts.
Best Practices
Naming Conventions
feature/user-authentication
fix/login-timeout
hotfix/security-patch
release/v2.0Keep main Clean
- Don't commit directly to main
- Use feature branches
- Merge via pull requests
Delete Merged Branches
Clean up after merging to keep the sidebar tidy.
Pull Before Push
Always pull latest changes before pushing to avoid conflicts.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+P | Push to remote |
Ctrl+Shift+P | Pull from remote |
| Double-click | Checkout branch |
Related
- Branches & Merging Guide — Detailed workflows
- Commit Graph — Visualizing branches
- Stash Management — Saving work temporarily
