component {fork,unfork} <component>
johntron opened this issue · 2 comments
johntron commented
I've been working on an enterprise webapp that's used component for about 1.5 years now. I've had to patch 4 or 5 public components to apply fixes or add minor functionality. The process goes like this:
- Fork public repo
- Update dependent components to use forked repo
- Build (installs forked copy)
- Replace forked component installed by component with a git clone
- Apply changes, build, test, push, create PR
- Update dependent components from step 2 to use the latest commit hash from the forked copy
- Wait for upstream to merge PR and bump version
- Revert dependent components from step 2 to use new upstream version
Maybe there's an easier way, but it would be nice if component helped out here like so:
component fork <original-component>
that would perform 1-4 (somehow remember the upstream copy)component use-fork <original> <forked-component>
for step 6component unfork <original-or-new>
for step 8.
Maybe also a list of forked components when component fork
is used without a component.
timaschew commented
yes, it's really a pain, but I don't think it belongs to component.
It could be a feature of https://github.com/tj/git-extras
cristiandouce commented
Just for reference and maybe as an interest implementation, I use hub fork
from github:
https://github.com/github/hub#git-fork
It might be of interest to check how they do it.