Git Branches
Manage local and remote branches without leaving VS Code. The Git Branches panel in the SnakeFlow sidebar shows all branches, lets you switch context in one click, and provides lightweight branch cleanup tools.
Features
- View all local branches sorted by last commit date
- Checkout a branch with one click — no terminal command needed
- Delete a branch — single or multiple selection supported
- Protected branches require double confirmation before deletion
- Open on GitHub — clicking a branch opens its compare view on GitHub
How to Open
The Git Branches panel lives in the SnakeFlow sidebar view. Click the branch icon to expand the panel. Branches are listed in reverse chronological order (most recently committed first), so your active feature branches are always at the top.
Switching Branches
Click any branch name to check it out. SnakeFlow runs git checkout <branch> in the background and updates the status bar to reflect the new active branch. There is no prompt or confirmation — the switch is instant.
If you have uncommitted changes, Git will refuse the checkout (same as the terminal behavior). SnakeFlow will show an error message so you know to stash or commit first.
Deleting Branches
Right-click a branch to reveal the delete option. You can also select multiple branches at once and delete them in bulk — useful for cleaning up merged feature branches.
Protected branches (main, master, develop, staging, production by default) show a confirmation dialog before deletion to prevent accidental removal of long-lived branches.
Configuration
"devManager.git.defaultBranch": "main","devManager.git.protectedBranches": ["main", "master", "develop", "staging", "production"]protectedBranches — any branch matching a name in this list will show a confirmation dialog before deletion. Customize the list to match your project’s branch model.
Remote operations (pull / push / merge)
SnakeFlow does not wrap pull, push, merge, or sync from upstream — use the tools your editor already ships with:
- Source Control panel (
Ctrl+Shift+G) — Pull, Push, Sync, and Merge Branch from the···menu. - Terminal — plain
git pull/git push/git merge, with full control over flags and conflict resolution.
SnakeFlow focuses on what the editor does not cover: the branch list with checkout/delete, the divergence indicator, and the GitHub compare view.
Status Bar
The Git branch status bar item is read-only — it reports state, it does not run Git operations. It shows the current branch name and its divergence from the remote in a compact format:
$(git-branch) main— on the default branch, in sync withorigin/main$(git-branch) feature/x ↑2— 2 commits ahead of the default branch$(git-branch) main ↓3— 3 commits behindorigin/main(highlighted in warning colour)$(git-branch) feature/x ↑1 ↓4— diverged fromorigin/mainin both directions
The sync indicator compares feature branches against origin/<default> (e.g. origin/main), not against their own upstream — so it answers “how far has main moved since I branched off?”.
Status refreshes every 3 seconds (status poll) and every 15 seconds (remote fetch). It also refreshes immediately on window focus.
To diagnose display issues, enable devManager.git.statusBar.debugLog — refresh and fetch lifecycle events appear in the SnakeFlow: Git Status Bar Output Channel.
Open on GitHub
Each branch entry has an Open on GitHub action that constructs the compare URL (/compare/main...<branch>) and opens it in your browser. This is useful for quickly checking what a branch contains before raising a pull request.
Related Features
- GitHub Integration → — create pull requests and manage issues
- Dev Servers → — start the right server after switching branches