I've changed my mind. So v3 is not a polished v2. It's quite different. And I hope it's good different. In v2, .git/config contains both shared part and the per-worktree part (for main worktree). It's ugly, slow and hard to work with. v3 adds a completly new config file for sharing. ".git/config" will not be shared any more. For any worktree, the new file .git/common/config is read first, then either .git/config or .git/worktrees/xxx/config is read after. There's no special per-worktree var list any more. Which is great. You want to add per-worktree config vars, use "git config --local". You want to add per-repo config vars, use (new) "git config --repo". You put a variable in a wrong file, you're punished for it (and it's the same today, say if you put core.worktree to /etc/gitconfig). The only ugly part I see is how to deal with released git binaries, how to make it reject the new config split (because otherwise it would read incorrectly). A lot more explanation is in patch 04/06. The series is also available at https://github.com/pclouds/git/tree/worktree-config Nguyễn Thái Ngọc Duy (6): worktree: new repo extension to manage worktree behaviors path.c: new (identical) list for worktree v1 worktree: share .git/common in v1 worktree: new config file hierarchy config: select .git/common/config with --repo worktree add: switch to worktree version 1 Documentation/config.txt | 5 +- Documentation/git-config.txt | 14 +++- Documentation/git-worktree.txt | 31 +++++++- Documentation/gitrepository-layout.txt | 12 +++ Documentation/technical/repository-version.txt | 6 ++ builtin/config.c | 19 +++-- builtin/worktree.c | 95 ++++++++++++++++++++++ cache.h | 5 +- config.c | 14 +++- environment.c | 1 + path.c | 40 +++++++++- setup.c | 40 ++++++++-- t/t2028-worktree-config.sh (new +x) | 104 +++++++++++++++++++++++++ 13 files changed, 364 insertions(+), 22 deletions(-) create mode 100755 t/t2028-worktree-config.sh -- 2.7.0.288.g1d8ad15 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html