Skip to content

.gitkeep files in data/runtime subdirectories should be kept in git#3

Open
elyukai wants to merge 2 commits into
getkirby:mainfrom
elyukai:main
Open

.gitkeep files in data/runtime subdirectories should be kept in git#3
elyukai wants to merge 2 commits into
getkirby:mainfrom
elyukai:main

Conversation

@elyukai

@elyukai elyukai commented May 14, 2025

Copy link
Copy Markdown

For me, the .gitignore configuration still made it so that the .gitkeeps in data/runtime subdirectories are ignored. The small adjustment made the exclusion rules work for me.

lukasbestle
lukasbestle previously approved these changes May 14, 2025
@lukasbestle

Copy link
Copy Markdown
Member

Actually I think we could use /data/runtime/**. Does that work for you?

@lukasbestle lukasbestle dismissed their stale review May 14, 2025 19:18

Open discussion

@afbora

afbora commented May 14, 2025

Copy link
Copy Markdown
Member

An idea that ignore all files and folders except folders have .gitkeep file.

/data/runtime/**
!/data/runtime/**/
!/data/runtime/**/*.gitkeep

@elyukai

elyukai commented May 15, 2025

Copy link
Copy Markdown
Author

@afbora With your exact rules it would also want to include the actual session and cache files, so that’s not working for me sadly. @lukasbestle’s suggestion is working for me tho so I’ll update the PR accordingly for now.

EDIT: The following works for me:

/data/runtime/**
!/data/runtime/**/.gitkeep

@elyukai

elyukai commented May 15, 2025

Copy link
Copy Markdown
Author

Actually, while I thought it worked, I made the mistake of checking it with an already-existing commit. So this actually still does not work for me. But I could generalize it more with

/data/runtime/*/*
!/data/runtime/*/.gitkeep

I haven’t found a way yet to make it work no matter the depth of the .gitkeep file.

I’m sorry for the whole back and forth! And I’ll be awaiting further comments here before making more changes to the actual code.

@afbora afbora requested a review from lukasbestle June 4, 2025 13:58
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.

3 participants