feat(config): auto-merge .gogo.local overlay in global mode - #57
Open
jensschulze wants to merge 1 commit into
Open
Conversation
jensschulze
marked this pull request as draft
September 2, 2026 14:50
jensschulze
force-pushed
the
feat/implement-local-conf-overlay
branch
from
September 2, 2026 15:32
b035b8b to
b473b3b
Compare
jensschulze
marked this pull request as ready for review
September 2, 2026 15:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
You can now keep a personal
.gogo.localconfig next to the shared.gogo. It stays uncommitted and gets merged into the effective config on every normal command, without passing-f. Useful for repos or commands only you care about: they behave like part of the project, but the shared config never learns about them.How it works
The overlay file follows the primary config's format:
.gogo.localnext to a JSON.gogo,.gogo.local.yamlnext to.gogo.yaml. Merge order is primary, then.gogo.local, then any-foverlays.Two deliberate limits:
-f, only those overlays are merged. The local file is not pulled in behind your back.project create,project import,git clone) work on the primary config alone. Your personal projects can't leak into the shared file through them.If a
.gogo.local.*file exists in the wrong format for the primary (say.gogo.local.yamlnext to a JSON.gogo), gogo warns you instead of ignoring it silently.Ignoring things in the right place
Each config layer gets its own ignore destination, so personal entries stay off everyone else's machine:
.gogo.localfile itself.gitignore, added automatically bygogo init,project importandmigrate.gitignore.gogo.local.git/info/exclude, per-repo and never committedThe
.git/info/excludeentries live in a marker-delimited block that gogo owns.gogo git updatekeeps that block in sync with the overlay: new local projects get added, removed ones get pruned, and anything you wrote into the file yourself is left alone.Changes
internal/config: local overlay resolution (LocalFilenameForPrimary),AppliedOverlaysandLocalProjectsonMetaConfigResult, managed-block sync for.git/info/excludeinternal/cli: exclude handling ingit update, overlay info and warnings invalidate,.gitignorewiring ininit,importandmigrate