Table of Contents
Excluding Branches and Files from Git Metrics Dashboards
Learn how to exclude specific branches and file types from LinearB dashboards to keep your metrics clean and focused.
Exclude specific branches, repositories, or file types from contributing to LinearB dashboards and metric calculations. This is useful for omitting irrelevant work from visibility and analytics—for example, excluding automation or build branches from your reports.

When to Use Exclusions
Use this feature to remove non-meaningful development activity from metrics like cycle time, work breakdown, or throughput. Exclusions ensure your engineering KPIs reflect actual work that drives product delivery.
You might exclude:
- Large, auto-generated code changes.
- Branches used for testing, spikes, or experimentation.
- Repositories containing configuration or deployment scripts

Editing Global Exclusions
To review and modify the list of excluded branches:
- In the LinearB side menu, click Settings to open the Company Settings window.
- Navigate to the Advanced tab.
- Scroll down to the Exclude Branches section.
- Use regular expressions to add or remove repositories from the exclusion list.
- Click Save.

Branches listed in the Exclude Branches list will not appear in your dashboards or reports, and their commits will be excluded from metrics.

Setting Exclusions for Specific Repositories
To exclude branches from a particular repository or to override global exclusions:
- Go to Company Settings > Git.
- Click the three dots next to the repository you want to set exclusions for, and select Monitoring Rules. The Company Settings window opens.
- In the Monitoring Rules Form, use regular expressions to exclude repositories as they are discovered.
- Click Save & Close. Any changes made here will override the global exclusion rules for that repository.
This will open a settings page with an Exclude Branches section specific to the repository. Any changes made here will override the global exclusion rules for that repository.

Excluding a Specific Branch
Admins or Editors can manually exclude individual branches directly:
- In the LinearB side menu, click Metrics, and select Git Activity.
- Click the three dots next to the branch you want to exclude, and select Exclude from cycle time calculation.

- When prompted click Save.
Manually excluded branches are marked with an orange dot next to the cycle time calculation.
To reinstate a manually excluded branch into cycle time metrics:
- Click the three dots again.
- Select Cancel branch exclusion.

Excluding File Paths and Extensions
You can configure LinearB to ignore specific file types or full file paths when scanning your repositories. This is done using regular expressions, and is useful for preventing non-critical files—such as build artifacts, documentation, or test assets—from inflating metrics like pull request size or code change volume.
Note: Despite the UI label “Exclude File Extensions”, the feature applies to the full file path. You can use patterns to exclude specific directories, filenames, or file extensions. These rules apply globally unless overridden at the repository level.
To exclude file types:
- Navigate to Company Settings > Git > Advanced.
- Scroll to the Exclude Files Extensions section.
- Enter a regular expression on each line to define which file types and extensions to exclude.
- Click Save.

Each entry must be a valid regex pattern matching the files to exclude. For example:
.*package-lock\.json$
.*dist/.*\.js
.*public/assets/.*\.js
.*\.(ini|csv|xls|xlsx|xlr|doc|docx|txt|pps|ppt|pptx|dot|dotx|log|tar|rtf|dat|ipynb|pol|profile|object|arb|snap)$
.*cypress/fixtures/.*\.ts
.*cypress/fixtures/.*\.js
.*mock.*\.(js|json)$
These exclusions are applied across all repositories unless overridden at the repository level. Once saved, files matching these patterns will be excluded from:
- PR size
- Code change calculations
- Metrics reporting
How did we do?
Enable Real-Time Connections in LinearB
Generating a LinearB API Token