<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh" -->

---
title: Push rules in rulesets now support path exceptions
description: GitHub push rules within rulesets now support path exceptions, letting a rule apply everywhere in scope except specific paths you designate. This applies to...
canonical: https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Push rules in rulesets now support path exceptions | daily.dev
og:description: GitHub push rules within rulesets now support path exceptions, letting a rule apply everywhere in scope except specific paths you designate. This applies to...
og:url: https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh
og:image: https://api.daily.dev/og/posts/zGjb1UXZh.png
og:image:alt: Push rules in rulesets now support path exceptions
og:image:width: 1200
og:image:height: 630
og:locale: 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

- [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
- [Push protection exemptions from repository settings](https://daily.dev/posts/push-protection-exemptions-from-repository-settings-y4xsquhd5) · 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

---

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)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Push rules in rulesets now support path exceptions","url":"https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh"},"datePublished":"2026-08-25T17:49:42.984Z","dateModified":"2026-08-25T17:53:04.475Z","description":"GitHub push rules within rulesets now support path exceptions, letting a rule apply everywhere in scope except specific paths you designate. This applies to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2510528b0a21ea229eedc576d06e376a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2510528b0a21ea229eedc576d06e376a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"GitHub Changelog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"GitHub Changelog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/15004b7835da4d89b02b115871f0f6dc","url":"https://daily.dev/sources/github_updates"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"github,git","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"GitHub Changelog","item":"https://daily.dev/sources/github_updates"},{"@type":"ListItem","position":3,"name":"Push rules in rulesets now support path exceptions"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/push-rules-in-rulesets-now-support-path-exceptions-zgjb1uxzh#faq","mainEntity":[{"@type":"Question","name":"How do I block a file type in a GitHub repository except for one specific path, like a gradle wrapper jar?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Can I enforce a file size limit on a GitHub repository without breaking existing large files that are already checked in?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}
```

