Setting it up only on development
It makes perfect sense to have the GIT Info Report module enabled in all environments. The module actually originated from the need to check if changes were made directly on the production server (they shouldn't).
However, if you prefer to use it only on the development environment, it is suggested to have one dedicated local Drupal install to monitor multiple projects on the same machine. See GIT INfo Report - How to define directories outside the project root - Drupal 8 guide on Drupal.org.
If you insist on running the module on the same Drupal install as the one you need to monitor, you need to:
- add it to Composer with
composer require --dev drupal/gitinfo
- use on production always
composer install --no-dev
(recommended) - If you do not want to share the configuration of the development modules, you can use the Drupal core functionality from version 8.8.0 onward using in the settings.php file:
$settings['config_exclude_modules'] = ['devel', 'gitinfo'];
See Modules can be excluded from the configuration synchronization.
OR
follow the instructions described in Creating a simple split configuration: Dev modules only in dev environments | Drupal 8 guide on Drupal.org
Note that this is required in case we use the Composer's require --dev
option. See #3081355: What happens if we use require --dev without using config_split. Comments there are welcome.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion