In a project that uses directories or files as part of presentation, you might want to ship some examples. But if those examples actually affect the final presentation, the expectation would be for the user to delete the example files and use their own.
I'm specifically referring to a scenario like this: https://github.com/lipupini/lipupini/tree/5.1.0/collection
The example directory is tracked since it needs to be available when cloning for the first time to get up and running and see how it works. If the directory is eventually deleted (as would be expected), is there a way to help ensure that the deleted example directory doesn't get recreated by Git later after deleting?
.hidden(which is added in `.gitignore) to the example directory once they are done with it. The software then checks for the file before doing its thing. This has the upside that users could activate the examples again if they want to.git cloneand actually being able to tinker with it before adding their own documents. The.hiddenidea could be a good track. I seem to remember there being a way to ignore a file yet have it in the repository for first pull. The concern is in a case where someone just wants to pull in the latest changes, if they've deleted theexampledirectory then I think it'll probably be put back.workspace.examplewith examples, haveworkspacebe an empty directory which only has.gitkeepand in.gitignoreyou ignore everything else inworkspace. Instruct users to copy the workspace.example directory to theworkspacedirectory to try out the examples. Or just have the workspace directory a parameter / setting that can even be outside the repo.