New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.gitignore recommendation in 'environment Git Information' modal should be refined #291
Comments
|
I patched Drupal core once ( There may be a better way to prevent something like this from happening in the future, but regardless I'm sure that improving the .gitignore recommendation's interface language and priority will save some Devshop users from making a related mistake. |
|
Thank you for the detailed bug report. I would like to try and make the git ignore setup automatic, so dynamically outputting it would be a good first step. I'm thinking the composer patches bug warrents a separate issue. Mind posting another? |
|
Can do, although I don't think it's a separate bug. It's doing what it's intended to do (remove Drupal core in order to re-add it and apply the patch), the only issue is that it's removing (web)/sites/*/drushrc.php because it's not ignored by git. I think automating the git ignore setup solves the problem. Thoughts? I'll definitely create another issue if that'd be helpful. |
|
I see, so the compose-patches process reverts the git status essentially? |
|
I'm starting to wonder, is there a way to drop a .gitignore file that is NOT included in the repo? Like, if we were to write a /sites/DOMAIN.com/.gitignore file specifically for aegir-generated files, would that prevent them from appearing in git?? I will test this... |
|
nope. Maybe there's another way. |
|
According to https://git-scm.com/docs/gitignore
Aegir could technically write either of these automatically. thoughts? |
|
Suggesting the user to create such a global exclude file sounds like a nice solution. It's easier then adding it to all repo's. PS: Another 'default' location is ~/.gitignore |
|
I'm thinking, we should get specific as possible. excluding "drushrc.php" without specifying the path might have unexpected consequences. I'm thinking Hosting_git module should be able to write the ie...
There could be global drush options to prevent this from happening, and to tweak how it's done, if needed. |
|
I like the idea of a git exclude of each specific site's Aegir config files, taking into account the custom site root directory from the project configuration. This approach would need to be documented so that developers don't overlook this configuration and attempt to make changes to these configuration files using their git repo (although developers should be making any necessary changes in local.settings.php anyhow). Alternatively perhaps we could just recommend that these lines be committed and pushed to each site repository's .gitignore file like so, on environment create:
|
|
Another possible solution when using drupal-composer/drupal-project, may be to list drushrc.php in the drupal-scaffold excludes configuration. https://github.com/drupal-composer/drupal-scaffold#configuration Thoughts? |
|
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! |
|
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. |
caldenjacobs commentedJul 19, 2018
•
edited
The current warning reads something like this:
Aegir files were detected by git. It is recommended to add the following to your .gitignore file: Aegir files sites/sites.php sites/*/files sites/*/private sites/*/drushrc.php sites/*/settings.php sites/*/local.settings.php sites/all/drush/drushrc.phpWe should be dynamically adding in the specified web root, e.g. if the project web root has been defined as "docroot", each line should be prefixed with "docroot/":
Aegir files docroot/sites/sites.php docroot/sites/*/files docroot/sites/*/private docroot/sites/*/drushrc.php docroot/sites/*/settings.php docroot/sites/*/local.settings.php docroot/sites/all/drush/drushrc.phpIt may make sense to also integrate this warning into the project or environment creation process.
The text was updated successfully, but these errors were encountered: