Skip to content

Split Git configuration into shared and profile-specific files #176

Description

@mamahoos

Context

The main and server profiles intentionally use different Git policies. In particular, server hosts do not have the private GPG key and must keep commit/tag signing disabled, while the local machine keeps signing enabled.

Keeping complete .gitconfig versions on each branch is reliable today, but shared Git settings can drift between profiles over time.

Goal

Split Git configuration into a shared layer and explicit profile layers:

  • .gitconfig.shared — common aliases, editor, pager, merge, diff, credential, and general Git behavior.
  • .gitconfig.main — local-machine identity and GPG signing policy.
  • .gitconfig.server — server/root identity and GPG-disabled policy.
  • .gitconfig — a small profile-specific loader that includes the appropriate files.

Do not use an implicit if based on hostname, current repository branch, or repository path to detect the machine profile.

Acceptance criteria

  • Shared settings exist in .gitconfig.shared without duplicated profile-specific policy.
  • main loads .gitconfig.shared and .gitconfig.main.
  • server loads .gitconfig.shared and .gitconfig.server.
  • main keeps GPG commit/tag signing enabled.
  • server keeps GPG commit/tag signing disabled and does not require a private signing key.
  • Existing aliases, credentials, merge, diff, editor, pager, and send-email behavior remain unchanged unless explicitly documented.
  • The server-sync workflow protects the profile-specific Git config files while syncing shared files.
  • Install and smoke checks pass for both profiles.
  • Documentation explains how to select, inspect, and safely migrate each profile.

Notes

This issue is intentionally deferred until the server-sync workflow is stable. Avoid implementing it as a hostname- or branch-dependent conditional; explicit profile files are easier to audit and safer for root/server use.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions