My Branch

By Nordic Cloud Labs
A sidebar that answers one question instantly: what did I actually change on this branch?
Not "everything git thinks is dirty" — the Source Control view mixes your branch's work with anything else touching the tree. My Branch diffs against the commit where you branched off, so committed, staged, unstaged, and untracked changes all show up in one focused list, and nothing else does.
Screenshots
Sidebar in default folder-tree

Compare Branch quick pick or search

Right-click context menu open on a fil

Why My Branch
- Branch-scoped, not workspace-scoped — only files that differ from your merge-base, so a big repo with unrelated in-progress work elsewhere doesn't drown out your own change set
- One list, every change type — committed, staged, unstaged, and untracked together, instead of stitching together Source Control + Explorer +
git status
- Built for review, not just diffing — active-file highlighting, drag-to-attach, and copy actions are aimed at the moment before you open a PR, when you're re-reading everything you touched
Privacy & trust
- 100% local. Every operation shells out to your own
git binary (execFile, no bundled git library)
- No network calls, ever. The extension never phones home; it only reads the repository already open in your workspace.
- Open source. MIT-licensed, source at github.com/FredrikBurlin/my-branch — read exactly what it does before you trust it with your repo.
Features
- Branch-scoped file list — shows only files that differ from where your branch diverged, not all modified files in the repo
- All change types included — committed, staged, unstaged, and untracked files in one view
- Pick your compare branch — pick any local/remote branch from a picklist (sorted by recent activity) or type one in; the view header always shows what you're comparing against
- Folder tree view by default — toggle between a folder tree and a flat file list, with Collapse All for the tree
- Native file icons — uses your active icon theme (Material Icons, VSCode Icons, etc.)
- Status badges — each file is labeled
M (modified), A (added), D (deleted), R (renamed), U (untracked), C (merge conflict)
- Diff stats — optional
+12 -4 line-count badges per file (off by default; toggle from the view title bar)
- Hide deleted files — toggle deleted files on or off when you don't need them
- Click to open — click any file to open it directly; right-click → Open Diff to see it against your merge-base instead
- Active file highlighting — automatically reveals and selects the file you're editing, just like the Explorer — without hijacking your sidebar if you're working somewhere else
- Drag out — drag a file from the list onto the editor area to open it, or onto a chat panel to attach it
- Multi-select — select several files and copy paths/names, open, or stage all of them at once
- Copy as Markdown list — grabs the whole changed-file list as a paste-ready bullet list (
- \path` `) for PR descriptions
- Right-click context menu — Open Diff, Open to the Side, Stage, Reveal in Explorer, Reveal in Finder, Copy Path, Copy Relative Path, Copy File Name, Rename, Delete
- Live updates — refreshes automatically when you stage, commit, save, or switch branches
- Smart base detection — auto-detects your upstream branch; falls back to
main, then master, then develop
How It Works
My Branch finds the merge base between your current branch and its upstream (the commit where the branch diverged), then combines:
git diff <merge-base>..HEAD — committed changes on your branch
git diff --cached — staged changes
git diff — unstaged changes
git ls-files --others — untracked files
Files that were added and then deleted on the branch (net zero) are excluded automatically.
Usage
Open any git repository in VS Code. The My Branch tab appears in the activity bar.
| Action |
How |
| Pick the branch to compare against |
Branch icon in the view title bar — choose from the list or type a branch name |
| Toggle flat / tree view |
Buttons in the view title bar (tree is the default) |
| Collapse all folders |
Collapse All icon in the view title bar (tree view only) |
| Show / hide deleted files |
Eye icon in the view title bar |
| Show / hide diff stats |
Diff icon in the view title bar (off by default) |
| Copy the whole list as a Markdown list |
"..." menu in the view title bar → Copy as Markdown List |
| Refresh manually |
Refresh icon in the view title bar |
| Open a file |
Click it |
| Open Diff (vs. your merge-base) |
Right-click → Open Diff |
| Open to the Side |
Right-click → Open to the Side (opens every selected file if multiple are selected) |
| Stage a file |
Right-click → Stage (works on multiple selected files at once) |
| Reveal in Explorer |
Right-click → Reveal in Explorer View |
| Copy file path / name |
Right-click → Copy Path / Copy Relative Path / Copy File Name (joins all selected files, one per line, if multiple are selected) |
| Attach a file elsewhere |
Drag it onto the editor area or a chat panel |
| Rename / delete a file |
Right-click → Rename... / Delete (delete asks for confirmation and moves the file to the trash) |
Configuration
| Setting |
Default |
Description |
myBranch.upstream |
"" |
Override the upstream branch used for merge-base calculation (e.g. origin/develop). Leave empty for auto-detection. Overridden by the branch picked via the view title bar, which is remembered per workspace. |
Example — if your team branches off develop instead of main:
"myBranch.upstream": "origin/develop"
Requirements
- VS Code 1.93.0 or higher
- Git installed and available on your
PATH
Development
git clone https://github.com/FredrikBurlin/my-branch
cd my-branch
npm install
npm run compile
# Press F5 to launch the Extension Development Host
No automated test suite exists yet — verification is manual, via the Extension Development Host.
Contributing / Feedback
Found a bug or have a feature request? Open an issue.
License
MIT
| |