---
title: "Push rules in rulesets now support path exceptions"
url: https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh
source_url: https://github.blog/changelog/2026-08-25-push-rules-in-rulesets-now-support-path-exceptions
type: article
source: "GitHub Changelog"
published: 2026-08-25T17:49:42.984Z
updated: 2026-08-25T17:53:04.475Z
tags: ["github", "git"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Push rules in rulesets now support path exceptions

**[GitHub Changelog](https://daily.dev/sources/github_updates)** · 2 min read · 0 upvotes · 0 comments

## Summary

GitHub push rules within rulesets now support path exceptions, letting a rule apply everywhere in scope except specific paths you designate. This applies to two push rules: Restrict file paths (e.g., block JAR files everywhere except a wrapper directory) and Restrict file size (exempt paths already exceeding a new limit so you can adopt it without modifying existing files). The feature is available in public preview under the Allowed exceptions section when configuring a supported rule, and GitHub validates path patterns at save time.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.blog/changelog/2026-08-25-push-rules-in-rulesets-now-support-path-exceptions>

## Questions this post answers

### How do I block a file type in a GitHub repository except for one specific path, like a gradle wrapper jar?

Use the Restrict file paths push rule in a GitHub ruleset and add a path exception under Allowed exceptions. You can block a file type such as JAR files across the entire repository while allowing it at a specific path, for example exempting the pattern **/gradle/wrapper/*.jar. This feature is in public preview and GitHub validates the pattern syntax when you save the ruleset.

_Teams tightening repository push rules can follow ruleset feature updates like this on daily.dev._

### Can I enforce a file size limit on a GitHub repository without breaking existing large files that are already checked in?

Yes, the Restrict file size push rule in GitHub rulesets now supports path exceptions, letting you enforce a size limit while exempting paths that already exceed it. This lets you adopt the new limit going forward without having to modify or remove the existing oversized files first. The feature is currently in public preview.

_Developers rolling out stricter repo policies can track changes like this on daily.dev._

## Similar posts on daily.dev

- [Push protection exemptions from repository settings](https://daily.dev/posts/push-protection-exemptions-from-repository-settings-y4xsquhd5) · GitHub Changelog · 0 upvotes · 0 comments
- [Required reviewer rule is now generally available](https://daily.dev/posts/required-reviewer-rule-is-now-generally-available-gdbncmd5h) · GitHub Changelog · 6 upvotes · 0 comments
- [GitHub ruleset exemptions and repository insights updates](https://daily.dev/posts/github-ruleset-exemptions-and-repository-insights-updates-85lhw6lg4) · GitHub Changelog · 0 upvotes · 0 comments
- [Push protection exemptions for roles, teams, and apps](https://daily.dev/posts/push-protection-exemptions-for-roles-teams-and-apps-pbizuwijs) · GitHub Changelog · 0 upvotes · 0 comments
- [Automatically migrate branch protection rules to repository rulesets](https://daily.dev/posts/automatically-migrate-branch-protection-rules-to-repository-rulesets-fm2tkakq4) · GitHub Changelog · 4 upvotes · 1 comments

---

Tags: [#github](https://daily.dev/tags/github), [#git](https://daily.dev/tags/git)

[View this post on daily.dev](https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh)
