Overview
The Git Graph view provides a powerful visual representation of your repository’s commit history, branches, and relationships. The graph is rendered using SVG with smooth animations and supports both rounded and angular branch transitions.Graph Visualization
Graph Styles
The extension supports two graph rendering styles:Branch Colors
The graph uses a customizable color palette to distinguish branches. By default, 12 distinct colors are provided:Colors are specified in HEX or RGB format and cycle through the palette for repositories with many branches.
Customizing Colors
You can customize the color palette to match your preferences:- Settings UI
- settings.json
- Open VS Code Settings (Cmd/Ctrl + ,)
- Search for “neo-git-graph.graphColours”
- Click “Edit in settings.json”
- Modify the color array
Uncommitted Changes
Visual Indicator
Uncommitted changes appear as a special node at the top of the graph with:- Hash:
* - Gray color:
#808080 - Message format:
"Uncommitted Changes (N)"where N is the number of changed files - Parent: Current HEAD commit
Implementation Details
The extension usesgit status -s --branch --untracked-files --porcelain to detect:
- Modified files
- Untracked files
- Staged changes
Commit Loading
Initial Load
Control how many commits are initially displayed:Load More Commits
When more commits are available, a “Load More Commits” button appears. Configure the increment:Branch Filtering
- All Branches
- With Remote Branches
- Current Branch Only
Shows commits from all local branches and tags:
Graph Rendering
SVG Structure
The graph is rendered as SVG paths with:- Shadow layer: Provides depth to branch lines
- Line layer: Colored branch paths
- Circles: Commit nodes (radius: 4px)
- Current commit: Hollow circle with colored stroke
Grid System
The graph uses a coordinate system defined inweb/graph.ts:
Expanded Commit Details
When a commit is selected, the graph automatically adjusts:- Lines below the commit shift down by
expandYpixels - Lines crossing the expansion stretch vertically
- Branch transitions maintain visual continuity
Enable auto-centering to automatically scroll to commit details:
Tab Icon
Customize the Git Graph tab icon appearance:- colour: Multi-color icon (default)
- grey: Grayscale icon for monochrome themes
Performance Tips
Large Repositories
Large Repositories
- Reduce
initialLoadCommitsto 100-200 - Disable
showUncommittedChanges - Use branch filtering to focus on relevant commits
Multiple Remotes
Multiple Remotes
- Toggle remote branches only when needed
- Remote branches add overhead to graph calculation
Deep History
Deep History
- Load commits incrementally using “Load More”
- Use branch selector to limit scope
Related Settings
| Setting | Type | Default | Description |
|---|---|---|---|
graphStyle | "rounded" | "angular" | "rounded" | Branch transition style |
graphColours | string[] | 12 colors | Color palette for branches |
showUncommittedChanges | boolean | true | Display uncommitted changes node |
initialLoadCommits | number | 300 | Commits to load on open |
loadMoreCommits | number | 100 | Commits per “Load More” |
showCurrentBranchByDefault | boolean | false | Filter to current branch |
autoCenterCommitDetailsView | boolean | true | Auto-scroll to details |
tabIconColourTheme | "colour" | "grey" | "colour" | Tab icon color scheme |