public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [Feature Request] Support for sharing root-level files across repositories
@ 2025-09-26  8:33 George Ogden
  2025-09-29 17:25 ` rsbecker
  0 siblings, 1 reply; 4+ messages in thread
From: George Ogden @ 2025-09-26  8:33 UTC (permalink / raw)
  To: git

Hello Git developers,

Firstly, apologies if this has already been discussed or if there is a
way to solve this problem that I am not aware of.

Motivation

Git submodules are very useful for sharing directories between
repositories. However, in some workflows, there is a need to share a
single file that must live in the repository root.

A concrete example is .pre-commit-config.yaml. I maintain a standard
template across many repositories. When I add a new hook or update a
version, I have to manually update the file in each repository. I
could use a submodule for this, but submodules always appear in a
subdirectory — not at the root where tools expect this file.

The same issue arises with other configuration files that need to
reside at the top level of a project (linters, CI configs, licenses,
etc.).

Proposal

It would be helpful if Git provided a way to share a file across
repositories so that it appears at the root of the working tree,
without requiring a separate build step, symlink, or copy operation.

I understand there are alternative approaches (subtrees, packages,
external tooling), but they all involve extra indirection. Having
first-class support within Git for this use case would make it much
simpler and more consistent.

Thanks

Thank you for your work maintaining and evolving Git! I would greatly
appreciate any feedback on whether this idea has been considered
before, and if there are technical reasons it may not fit Git’s model.

Best regards,
George Ogden

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-29 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26  8:33 [Feature Request] Support for sharing root-level files across repositories George Ogden
2025-09-29 17:25 ` rsbecker
2025-09-29 19:32   ` George Ogden
2025-09-29 21:17   ` Ben Knoble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox