Closed jmatsushita closed 7 years ago
Lets see if I can help you with this. With subrepo you can't really merge only the subrepo. If you want to merge the actual subrepo content you need to work with the subrepo as a regular repo.
What you can do is creating a branch in your parent repo, clone in contents from another branch and then merge the parent repo branches. Then you can push the result of that into the subrepo, note that you will NOT get the merge marked correctly in the subrepo. So if someone checks out the subrepo standalone there will be no hints of the merge.
Ok it does make sense! That's a feature request then :)
@jmatsushita I don't see that this will be implemented in a reasonable future so I close it.
Hi there,
(I'm using issue/142 branch). I thought maybe my request was related to #197 but I can't figure it out so I might be having a different (and simpler) problem. I'm sharing my thought process and attempts so that maybe it can be helpful to improve the user experience for less git-savvy users like me.
I'm trying to do a merge in a child repo from a parent repo.
If I was not in a subrepo I would do
No trying to do the same thing from a parent subrepo I would do
I would expect to do something like
git subrepo checkout -b master child
andgit subrepo merge -b my_feature child
to mimick the workflow I'm used to.I've tried
But this fails because it can't find a common ancestor.
If I do
This yields
git-subrepo: Command failed: 'git checkout -B subrepo/child 13fcda...
and leaves my parent repo in a mess - Would be great ifgit subrepo clean
just reverted to before the interrupted command #178, or actually even better just subrepo commands never left the tree in a scary state like that. Currently I do:So, back to merging I now try another approach thinking I should create a
my_feature
branch in the parent repo instead:This fails with
git-subrepo: There are new changes upstream, you need to pull first.
If I then try
I get
git-subrepo: Can't branch: 'refs/subrepo/child/fetch' doesn't contain dcff64fafc...
Is it the case that I'm both missing something obvious and that the UX is somewhat helping to lead me astray :)