
Git Lanes
A clean branch graph for VS Code: every branch in its own lane, the default branch on the left, remote and local at a glance.

Install
- From VS Code: open the Extensions view (
Ctrl+Shift+X), search for Git Lanes, and click Install. Or run ext install lesyhau.git-lanes from the Quick Open (Ctrl+P).
- From a VSIX: download
git-lanes-<version>.vsix from Releases, then run Extensions: Install from VSIX… in VS Code.
Open a folder that is a git repository. The Git Lanes view appears at the bottom of the Explorer, under Outline and Timeline. Click Git Lanes in the status bar to open the full graph in an editor tab.
Features
Default branch on the far left. origin/HEAD decides which branch that is (falling back to main, master, trunk, develop). The gitLanes.defaultBranch setting overrides it.
Every branch keeps its own vertical lane, placed by three rules:
- A branch always branches off to the right of the branch it starts from.
- A branch always merges into a branch on its left. The one exception is a branch's own parent merged back into it ("sync" merges).
- Each branch takes the lowest lane these rules allow that is free for its whole lifetime, so lanes are reused and no space is wasted.
Among the arrangements that follow these rules, the solver picks the one with the fewest crossings, then the fewest lanes, then the shortest jumps.
Some crossings can't be avoided: two branches that overlap in time without one containing the other always cross once.
Smooth, consistent curves. Every branch-off and merge is an S-curve that leaves the commit dot at an angle and bends back into its lane, with both turns in plain sight: just above the parent for a branch-off, just below the merge commit for a merge. The further a curve jumps, the taller it is, so every curve turns about as gently as one to the next lane. Curves that fan out of one commit nest instead of crossing, and a curve makes room for any commit dot it passes.
The graph takes only the room it needs. Each row's message starts right after the lines passing through that row.
Remote first, local at a glance.
| Looks like |
Means |
| Solid badge, cloud icon |
Remote branch |
| Outlined badge, laptop icon |
Local branch (↑ ahead / ↓ behind its upstream) |
| Solid badge, both icons |
Local and remote branch at the same commit |
| Filled dot, solid line |
Commit on a remote |
| Hollow dot, dashed line |
Local-only commit (not pushed) |
Ring around the dot, HEAD tag |
Checked-out commit |
Remote branches are placed first. Local-only branches fill the lanes that are left. All / Remote hides local-only work without moving any lane.
Other remotes. In a repository with more than one remote (a fork, a mirror, upstream), the view's … menu has Hide Other Remotes' Branches to show only the primary remote (origin, or the first remote), and Show Other Remotes' Branches to bring them back. The choice is saved per workspace (gitLanes.otherRemotes).
Branch and tag names sit next to the branch's latest commit dot.
Fetch from the cloud icon in the view title, or the "Fetched 2 min ago" status at the top of the graph (click it). While fetching, the icon turns into a spinner and the status reads "Fetching…".
Git Lanes button in the status bar opens the full graph in the editor area, for big repositories where the sidebar is cramped. The view's "open in editor" button does the same.
The editor tab shows a wider table with Description, Author, Date and Commit columns, plus search.
Commit details open in an editor tab: changed files (click one for a diff), parents, refs, and Checkout, Create Branch, Copy Hash and Push (for local-only commits). Right-click a commit in the graph for the same actions.
Automatic fetch
On by default (gitLanes.autoFetch.enabled). A fetch runs:
| When |
Only if the last fetch is older than |
| The graph becomes visible |
1 min |
| The VS Code window regains focus |
2 min |
| ~3 s after local git activity (commit, checkout, branch or tag change) |
30 s |
| On an interval, while the window is focused and the graph is visible |
gitLanes.autoFetch.intervalMinutes (5) |
Automatic fetches never run more than once every 30 s, and they never show a credential prompt.
- After a failure, it waits 1, 2, 4 … up to 30 minutes before trying again.
- When you're offline, it retries every 5 minutes.
- When the remote needs you to sign in, automatic fetching pauses until a manual Fetch succeeds. A manual fetch that needs sign-in uses VS Code's Git sign-in.
Settings
| Setting |
Default |
|
gitLanes.autoFetch.enabled |
true |
Automatic fetching |
gitLanes.autoFetch.intervalMinutes |
5 |
Interval fetch period |
gitLanes.autoFetch.onWindowFocus |
true |
Fetch when the window regains focus |
gitLanes.autoFetch.onLocalActivity |
true |
Fetch after local git activity |
gitLanes.fetch.prune |
true |
Remove remote-tracking branches deleted on the remote |
gitLanes.defaultBranch |
"" |
Branch pinned to the left lane |
gitLanes.otherRemotes |
true |
Show branches from every remote; off shows only origin (or the first remote) |
gitLanes.maxCommits |
400 |
Commits per batch ("Load more" loads the next batch) |
gitLanes.laneColors |
[] |
Custom lane colours, used in order |
Contributing
Issues and pull requests are welcome at github.com/lesyhau/git-lanes. See CONTRIBUTING.md for building, testing and releasing.
License
MIT
| |