Every so often I find it necessary to move things from one repo to another and preserve history along the way. I've made do with a janky shell script that recreates all the commits touching relevant files in the new repo, but this looks like a much less sketchy way to do it. It even sends changes back to the original repo if I understand the code right.
Git can already do that with subtree, no other tools needed.
Show HN: Git-subcopy lets you link files across repositories
11–20 of 22 posts
Re: Show HN: Git-subcopy lets you link files across repositories
#12Every so often I find it necessary to move things from one repo to another and preserve history along the way. I've made do with a janky shell script that recreates all the commits touching relevant files in the new repo, but this looks like a much less sketchy way to do it. It even sends changes back to the original repo if I understand the code right.
Git can already do that with subtree, no other tools needed.
Re: Show HN: Git-subcopy lets you link files across repositories
#13Every so often I find it necessary to move things from one repo to another and preserve history along the way. I've made do with a janky shell script that recreates all the commits touching relevant files in the new repo, but this looks like a much less sketchy way to do it. It even sends changes back to the original repo if I understand the code right.
Git can already do that with subtree, no other tools needed.
Re: Show HN: Git-subcopy lets you link files across repositories
#14Every so often I find it necessary to move things from one repo to another and preserve history along the way. I've made do with a janky shell script that recreates all the commits touching relevant files in the new repo, but this looks like a much less sketchy way to do it. It even sends changes back to the original repo if I understand the code right.
Re: Show HN: Git-subcopy lets you link files across repositories
#15Re: Show HN: Git-subcopy lets you link files across repositories
#16What's the architecture of this idea? Is there a reasonable assumption that it would keep the complexity for maintainers low in 3+ repos having a relationship with each other? If so, how?
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…
Re: Show HN: Git-subcopy lets you link files across repositories
#17Earlier quoted context omitted.
Git can already do that with subtree, no other tools needed.
git-subtree is for incorporating an entire repo. To cherry-pick a single directory from another repo you probably need git-filter-branch to split that out into a standalone repo first, followed by git-subtree. Still, this is just two commands so I don’t see why a third party tool is warranted, especially since the third-party tool here seems to require a more complicated process (maybe it achieves more than what I th…
Re: Show HN: Git-subcopy lets you link files across repositories
#18Every so often I find it necessary to move things from one repo to another and preserve history along the way. I've made do with a janky shell script that recreates all the commits touching relevant files in the new repo, but this looks like a much less sketchy way to do it. It even sends changes back to the original repo if I understand the code right.
Git can already do that with subtree, no other tools needed.
Re: Show HN: Git-subcopy lets you link files across repositories
#19Earlier quoted context omitted.
Git can already do that with subtree, no other tools needed.
I'm still not too familiar with the differences between subtree and submodule. When should I use either?
Re: Show HN: Git-subcopy lets you link files across repositories
#20Earlier quoted context omitted.
git-subtree is for incorporating an entire repo. To cherry-pick a single directory from another repo you probably need git-filter-branch to split that out into a standalone repo first, followed by git-subtree. Still, this is just two commands so I don’t see why a third party tool is warranted, especially since the third-party tool here seems to require a more complicated process (maybe it achieves more than what I th…
Filter-branch / subtree doesn't let you move files outside the subdirectory, as far as I'm aware. Happy to be corrected on this point though.