Skip to content

Fix the Umbraco.gitignore re-include of umbraco/Data/packages - #4932

Open
L4XB wants to merge 1 commit into
github:mainfrom
L4XB:fix/umbraco-data-packages
Open

L4XB wants to merge 1 commit into
github:mainfrom
L4XB:fix/umbraco-data-packages

Conversation

@L4XB

@L4XB L4XB commented Oct 24, 2026

Copy link
Copy Markdown

Link to the application or project's homepage

https://umbraco.com/ (source: https://github.com/umbraco/Umbraco-CMS)

Reasons for making this change

The last rule of community/DotNet/Umbraco.gitignore, !**/umbraco/Data/packages ("include default location for packages"), has no effect. **/umbraco/* a few lines above ignores umbraco/Data, and git cannot re-include a path whose parent directory is excluded. So the packages folder is ignored like the rest of umbraco/Data.

#4314 fixed the same problem for !**/umbraco/models by changing **/umbraco/ to **/umbraco/*. That works for models, a direct child of umbraco/, but Data/packages is one level deeper and still sits under an excluded directory.

The fix re-includes umbraco/Data/, ignores its contents again, and then re-includes packages and the files in it:

!**/umbraco/Data/
**/umbraco/Data/*
!**/umbraco/Data/packages
!**/umbraco/Data/packages/*

The last line follows the existing !**/App_Data/[Pp]ackages/* rules in the same template. Without it, **/[Pp]ackages/* from VisualStudio.gitignore, which the template asks to be placed before its own rules, still hides the files inside packages.

What git does with each path, in a fresh repository (git ls-files -o --exclude-standard plus git check-ignore -v, git 2.50.1). Rows marked with * change:

path before after
umbraco/Data/packages/package.zip * ignored by **/umbraco/* tracked
umbraco/Data/packages/MyPackage/package.xml * ignored by **/umbraco/* tracked
umbraco/models/Article.generated.cs tracked tracked
umbraco/Data/Umbraco.sqlite.db ignored ignored (**/umbraco/Data/*)
umbraco/Data/TEMP/DistCache/x.txt ignored ignored (**/umbraco/Data/*)
umbraco/Logs/log.json, umbraco/mediacache/a.jpg ignored ignored (**/umbraco/*)
wwwroot/umbraco/backoffice.js ignored ignored

The result is the same with VisualStudio.gitignore placed before the template. With only the first three new lines, the two packages files stay ignored there by VisualStudio.gitignore's **/[Pp]ackages/*.

Links to documentation supporting these rule changes

Merge and Approval Steps

@L4XB
L4XB requested a review from a team as a code owner October 24, 2026 02:33
Copilot AI max review requested due to automatic review settings October 24, 2026 02:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants