I try to run monthly recipe syncs or so.
Everytime i have to clean up the same .gitignore files, would be nice if these are automatically cleaned after a recipe install/update ¯_(ツ)_/¯
e.g. https://github.com/symfony/recipes/blob/master/doctrine/doctrine-bundle/1.6/src/Entity/.gitignore
I also find these files annoying and I remove them ... but when I'm working in existing applications.
For new applications is great that directories are created for you.
So I guess this is tricky.
Well it's OK to generate empty dirs, which is what the .gitignore currently is for.
But then after the file can be removed, while remaining the empty dir until the user commits it.
I agree. Maybe Symfony Flex could check if there are files in that directory already and then don't sync the .gitignore file for that directory?
B.t.w. in my company we use .gitkeep files to keep empty directories in Git. As a .gitignore file suggest the intention that the file has been put there with the purpose of ignoring certain files in the directory. With .gitkeep it is clear that it's purpose is to _keep_ the empty dir in Git. I do know it is not documented and it is not officially supported by Git, but it is an industry standard. (.gitignore is documented, but not for this purpose)
.gitignore is the industry standard. Check https://stackoverflow.com/questions/7229885/what-are-the-differences-between-gitignore-and-gitkeep for the background behind this claim.
@ro0NL PR welcome.
Most helpful comment
I agree. Maybe Symfony Flex could check if there are files in that directory already and then don't sync the
.gitignorefile for that directory?B.t.w. in my company we use
.gitkeepfiles to keep empty directories in Git. As a.gitignorefile suggest the intention that the file has been put there with the purpose of ignoring certain files in the directory. With.gitkeepit is clear that it's purpose is to _keep_ the empty dir in Git. I do know it is not documented and it is not officially supported by Git, but it is an industry standard. (.gitignoreis documented, but not for this purpose)