Does this work with git-subtree?
See original GitHub issueWill this action work with subdirectories already pushed (and rejoined using --rejoin) to other repos using git subtree split/push
? I have an existing monorepo with subdirs that have their own subtree-maintained repositories. But I want to be sure that this action would maintain the history as created by git-subtree.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Git Subtree: Alternative to Git Submodule | Atlassian Git Tutorial
git subtree lets you nest one repository inside another as a sub-directory. It is one of several ways Git projects can manage project...
Read more >Git - Subtree - GeeksforGeeks
git subtree allows you to nest a repository as a subdirectory inside another. It's one of the various options for managing project dependenciesĀ ......
Read more >When to use git subtree? - Stack Overflow
The benefit of using subtree merge is that it requires less administrative burden from the users of your repository. It works with older...
Read more >Git Subtree basics - gists Ā· GitHub
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another...
Read more >How to Use Git Subtrees - Better Programming
Git subtree is a copy of a Git repository pulled into a parent one. Git submodule is a pointer to a specific commit...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the discussion! Iām going to close this for now, since it seems that generally the use cases donāt align exactly. It would be cool to see an implementation that allowed users to āopt-inā to 100% subtree compatible usage. But I suspect the cost/benefit doesnāt make the feature quite worth it.
š that makes sense
Yep, subtree is a bit simpler for many of the similar use-cases. The biggest benefit being that cloning a repo that uses subtrees doesnāt require any special commands or options (like recursing). The subtree directories are regular old directories.
(A feature thatās lost with subtree is that commits between the subdir-containing-monorepo and the subdir-as-root-repo have different shas, because pushing/pulling between them essentially re-plays commits. If having identical shas is important, then submodules are necessary.)
Yep, I think the primary benefit would just be a more declarative configuration. A single-line āuses: actionā declaration is more clear than a few lines of obscure and interpolated shell commands šø . But I agree, the benefit is slight.
The checkout action (as of v2), persists the auth token into the local git configuration. So the repo token configured here is the same one used for all subsequent git operations. Instead of using the default generated token (which has read access to its āownā repo) we use a token that has write access on the remotes.