Skip to content

Conversation

@rkotze
Copy link
Owner

@rkotze rkotze commented Dec 9, 2025

Adds support for using an environment variable (GITMOB_CONFIG_FILE) to store git-mob settings in a custom git config file instead of the global config. When GITMOB_CONFIG_FILE is set to a path, git-mob will use git config --file … for its settings; otherwise it continues to use --global. This is non-breaking and intended for per-machine/dotfiles workflows (see issue #282).

Changes:

  • New helper: packages/git-mob-core/src/git-mob-api/config-scope.ts
  • Use helper in packages/git-mob-core/src/git-mob-api/git-mob-config.ts
  • Tests: packages/git-mob-core/test/git-mob-config.spec.ts

Notes:

  • GITMOB_CONFIG_FILE should be an absolute/expanded path (no automatic ~ expansion).
  • local repo settings still use --local as before.
  • Optionally we can add README docs on the new env var.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Updated the CHANGELOG.md to capture my changes
  • Build (npm run build) was successfully run locally
  • All tests and linting (npm run checks) has passed locally
  • I kept my pull requests small so it can be reviewed easier

Pull request type

Please check the type of change your PR introduces:

  • Feature

Does this introduce a breaking change?

  • No

Other information

@rkotze rkotze self-assigned this Dec 9, 2025
@rkotze rkotze added the enhancement New feature or request label Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants