Skip to content

Separate GitLens metadata storage from Git configuration #4968

@eamodio

Description

@eamodio

Summary

Move custom GitLens metadata (merge targets, merge bases, etc.) from .git/config to a dedicated .git/gk/config file to prevent repository state churn and keep Git configuration clean.

Problem

Currently, GitLens stores custom metadata like gk-merge-target, gk-merge-target-user, and gk-merge-base directly in .git/config. This causes:

  • Repository state changes whenever metadata is updated
  • Potential conflicts with other tools that monitor or sync Git configuration
  • Unnecessary cluttering of the primary Git configuration

Solution

Store all GitLens-specific metadata in a dedicated .git/gk/config file to:

  • Keep the primary .git/config clean and unmodified by GitLens
  • Prevent repository state churn from metadata updates
  • Isolate GitLens metadata from other tools and workflows
  • Improve compatibility with shared/synced repositories

Impact

Users working with Git repositories in collaborative or automated environments will no longer see spurious repository state changes caused by GitLens metadata updates.

We will also do a one-time data migration at startup.

Closed by #4956

Metadata

Metadata

Assignees

Labels

area-gitIssues or features related to using Gitverified ✔Verified

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions