You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm currrently trying out ddev in a couple of Drupal 8 projects. The ddev config command makes it very easy to add ddev to these projects.
As soon as I start the project with ddev start, new files are generated to make my site compatible with ddev. That's awesome! However, there are multiple files that are generated but not .gitignored.
My full list of files that I'm able to add to git, are:
.ddev/config.yaml
drush/.gitignore
drupal/web/sites/default/.gitignore
I think it would be better if there are less automatically generated files that can be added to git.
Describe the solution you'd like
If all .gitignore files would contain this line:
/.gitignore
then the .gitignore files themselves would be gitignored. That way, this would be the only file available for git:
.ddev/config.yaml
Of course, if someone wants to change these .gitignore files they can still do that and the file would be marked "User-managed". That way, everyone can still add the files to git if they really want to.
Describe alternatives you've considered
Two other options I have:
Add .gitignore to the files myself, and remove the #ddev-generated to make them "User-managed". But that way, I would have to do that every time I'm trying out ddev in a project.
Just commit the .gitignore files and deal with it :-)
Additional context
I don't know Go at all, and I don't know about the internal infrastructure of ddev. But I think I found the two lines that would need to change, if this would be implemented. But I could be wrong ;-)
This part has been a bit annoying for DDEV Teams purpose, so I am agreed to remove the line /.gitignore on .ddev/.gitignore if possible 😅
But so far I have managed to do ONLY in ddev-folder:
Remove the auto-generated message on top
and change from /.gitignore to !/.gitignore
Committed the .gitignore-file in our repo.
But hopefully, we can remove the line about /.gitignore and able to let us commit it since I have noticed that ddev start didn’t generate such file, only when doing ddev config. Otherwise, let ddev start generate this file if it doesn’t exist.
Also, (an off-topic), in web/sites/.gitignore I usually add two more lines like when using drupal/core-composer-scaffold:
Is your feature request related to a problem? Please describe.
I'm currrently trying out ddev in a couple of Drupal 8 projects. The
ddev config
command makes it very easy to add ddev to these projects.As soon as I start the project with
ddev start
, new files are generated to make my site compatible with ddev. That's awesome! However, there are multiple files that are generated but not.gitignored
.My full list of files that I'm able to add to git, are:
I think it would be better if there are less automatically generated files that can be added to git.
Describe the solution you'd like
If all
.gitignore
files would contain this line:then the .gitignore files themselves would be gitignored. That way, this would be the only file available for git:
Of course, if someone wants to change these .gitignore files they can still do that and the file would be marked "User-managed". That way, everyone can still add the files to git if they really want to.
Describe alternatives you've considered
Two other options I have:
#ddev-generated
to make them "User-managed". But that way, I would have to do that every time I'm trying out ddev in a project..gitignore
files and deal with it :-)Additional context
I don't know Go at all, and I don't know about the internal infrastructure of ddev. But I think I found the two lines that would need to change, if this would be implemented. But I could be wrong ;-)
Remove ".gitignore" from this line (so it won't be added to the file twice):
https://github.com/drud/ddev/blob/1c1a287d8d391bd91189266dcda4c8db59459762/pkg/ddevapp/config.go#L917
Add "/.gitignore" to the gitignore template, between these two lines:
https://github.com/drud/ddev/blob/1c1a287d8d391bd91189266dcda4c8db59459762/pkg/ddevapp/utils.go#L198-L199
That way, every ".gitignore" that is created and managed by ddev will have a "/.gitignore" entry. I think.
The text was updated successfully, but these errors were encountered: