Commit Loading
initialLoadCommits
Specifies the number of commits to initially load when opening Git Graph.This setting controls how many commits are fetched and displayed when you first open the Git Graph view. For repositories with extensive history, you may want to adjust this value based on your needs:
- Lower values (e.g., 100-200): Faster initial load time, especially for large repositories
- Higher values (e.g., 500-1000): More commit history visible without additional loading
loadMoreCommits
Specifies the number of commits to load when the “Load More Commits” button is pressed.This button only appears when more commits are available beyond those currently displayed. Adjusting this value affects:
- Lower values (e.g., 50): More frequent loading, but smaller chunks
- Higher values (e.g., 200-500): Fewer loads needed to view deep history
Repository Features
showUncommittedChanges
Show uncommitted changes in the Git Graph.When enabled, Git Graph displays your working directory changes and staged files as an uncommitted node in the graph.Performance impact:
- For large repositories with many files, checking for uncommitted changes can add to the load time
- Set to
falseto decrease load time on large repositories - You’ll still have full access to committed history even when disabled
Workspace Configuration
maxDepthOfRepoSearch
Specifies the maximum depth of subfolders to search when discovering repositories in the workspace.This setting controls how deep into your workspace folder structure Git Graph will search for Git repositories:
0- Only search the workspace root folders (no subfolders)1- Search workspace root and one level of subfolders2- Search workspace root and two levels of subfolders- And so on…
- Higher values allow discovering nested repositories but increase search time
- Lower values improve startup performance but may miss deeply nested repositories
If you have a monorepo or workspace with many nested Git repositories, you may need to increase this value. However, be aware that higher values will increase the time it takes to discover all repositories when VS Code starts.
Performance Optimization Examples
For Very Large Repositories
If you’re working with repositories that have tens of thousands of commits and many files:For Fast Performance
Minimal settings for the fastest possible performance:For Deep History Access
If you frequently need to view extensive commit history:For Monorepo Workspaces
If you have nested repositories in your workspace:Performance Tips
Why is Git Graph slow to load?
Why is Git Graph slow to load?
Several factors can affect load time:
- Large number of commits being loaded initially
- Checking for uncommitted changes in repositories with many files
- Searching deeply nested folders for repositories
initialLoadCommits and setting showUncommittedChanges to false.How many commits should I load initially?
How many commits should I load initially?
It depends on your needs:
- 100-200 commits: Good for quick access to recent history
- 300-500 commits: Balanced approach (default is 300)
- 500-1000 commits: For viewing extensive history without frequent reloading
Should I disable uncommitted changes?
Should I disable uncommitted changes?
Disable
showUncommittedChanges if:- You have a very large repository with thousands of files
- Initial load time is too slow
- You primarily use Git Graph to view history, not current changes
- You want to see your working directory state in the graph
- Load time is acceptable
- Your repository is small to medium sized