Why is there .git folder

Created on 12 July 2024, 4 months ago
Updated 15 July 2024, 4 months ago

Problem/Motivation

When using composer to update using composer update, I get…

  - Syncing drupal/prism (2.2.0) into cache
  - Upgrading drupal/prism (2.1.0 => 2.2.0):     Update failed (The .git directory is missing from <LOCAL_DEV_SITE>\modules\contrib\prism, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]? yes
  - Removing drupal/prism (2.1.0)
  - Installing drupal/prism (2.2.0): Cloning 2.2.0 from cache

I probably removed the .git folder manually on a previous update because it sems to cause me problems with my local Git client β€” something to do with Git sub-modules but I don't really understand all that.

My question to the community is why is that .git folder present on a full release anyway, I think I understand why it might be there if I was using a -dev module but not for a release. I'm sure it's my ignorance of things here but if someone could put me right I'd be grateful.

Thanks all

πŸ’¬ Support request
Status

Active

Version

2.2

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom SirClickALot Somerset

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

Comments & Activities

  • Issue created by @SirClickALot
  • πŸ‡ΊπŸ‡ΈUnited States eojthebrave Minneapolis, MN

    It doesn't look like there's a .git/ directory in the source code on GitLab. I wonder if you previously installed the module using Git by cloning it from GitLab? Or via Composer but installed from source instead of dist?

Production build 0.71.5 2024