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.
Git menu (remotes)
From the Command Palette or main menu, SnakeFlow: Git Menu groups common Git operations:
- Sync from Upstream — fetch and merge (or rebase, depending on your local Git setup) from the
upstreamremote when you work on a fork. - Pull from Origin — update the current branch from
origin. - Push to Origin — push the current branch to
origin.
These run against the first workspace folder and use your normal Git credentials (SSH or HTTPS as configured). They complement branch checkout/delete in the sidebar — use them when you want a quick sync without opening the terminal.
Status Bar
The Git branch status bar item shows:
- Current branch name (as icon-only — VS Code already shows the full name)
- ↑N — commits ahead of remote
- ↓N — commits behind remote
Click it to pull from origin. Status auto-refreshes every 60 seconds and on window focus.
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