"Managing File and Configuration Revisions with Git" is misleading regarding configuration revisioning with Git

Created on 6 May 2023, about 1 year ago
Updated 7 May 2023, about 1 year ago

Documentation location/URL

https://www.drupal.org/docs/user_guide/en/extend-git.html →

Problem/Motivation

The guide seems to be about configuration revisions. However, the "Steps" sections says to exclude the config folder from Git (see step 4 regarding .gitignore). This would exclude the configuration from revisioning via Git.

Proposed resolution

Adjust the suggested entries for .gitignore and explain what should be excluded.

Make sure to check the .gitignore file. The following types of files should be excluded:

  • components installed via composer like Drupal core and contrib
  • files with sensitive information, i.e. passwords
  • directories with user generated files, especially the one for private files

If your web root is not your top directory, check each of these to see if they need a prefix. For example, sites may need to be replaced with web/sites.

Example:

# files added by composer
core
modules/contrib
profiles/contrib
themes/contrib
# sensitive data
sites/*/settings*.php
# user generated files
sites/*/files
private

Remaining tasks

  1. Review the recommendation
  2. Change the documentation
📌 Task
Status

Active

Component

Correction/Clarification

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024