Live data from Hacker News

Show HN: Git-subcopy lets you link files across repositories

gitlab.com

21–22 of 22 posts

Re: Show HN: Git-subcopy lets you link files across repositories

#21
I believe there's some confusion around what git-subcopy does. It doesn't actually preserve history or anything like it. It just clones a certain file into your repository as a new commit, while saving which revision the file is from.

A potentially good candidate for using git-subcopy would be on this file: https://github.com/nix-community/rnix-parser/blob/master/ben.... It's copy-pasted from the nixpkgs upstream repository. It can't be used as a submodule - it's just one file out of dozens, no way people want to clone all that. Even worse with subtree, that'll always clone the whole upstream repo, and pollute the history on top of that. But the way it is currently, there's also no hint where it comes from.

git-subcopy is basically just me imagining a solution where you can not only link files or directories between repos without bloating down code size or history, but also modify them and later check what modifications you've made and rebase them. If you don't have a use case for this tool, good for you!

Re: Show HN: Git-subcopy lets you link files across repositories

#22
post #7

Earlier quoted context omitted.

Not sure I understand the question correctly, but here goes: My personal bias is to keep using submodules or at least subtrees where possible, mainly because it's builtin and because it's written by smart people. This is mostly for when repositories are pretty big and you don't want to submodule/subtree the entirety. But that's just me. I hope the maintainer complexity is as low as any other git solution, all the reb…

My impression is that monorepo got popular because submodules are too complicated to use on 3+ projects combined together. And I don't mean that the user interface sucks or that it's illogical to use, but most people will tend to use rather less submodules than more, even experienced git users. Therefore I think the breakthrough will come with someone who really understands submodules but has a great idea how to simp…

I'm afraid I'm not the messiah you're looking for, then. This is not a replacement for subtrees/submodules. But from my limited experience I agree with what you're saying :)
Post reply on HN