0

Here's how my repository tree look like:

. . (more commits ahead)
O O
|/
O 'root.project2' (pulled from a git bundle)

O
|
O
|
O 'root.project1'
|
O 'root.repository'

I need to make root.project2 a branch of root.repository just like root.project1. I've tried lots of rebasing/merging but usually only the branch commit would go to the right place. The remaining commits wouldn't follow it.

Cœur
  • 37,241
  • 25
  • 195
  • 267
mcopo
  • 103
  • 1
  • 6
  • Not entirely sure what you want to have happen - something similar to this post? http://stackoverflow.com/questions/18470568/how-to-transplant-a-feature-in-a-topic-branch-to-another-branch – rholmes Aug 06 '15 at 19:20
  • I tried this already... Instead of actually "repointing" the commits, it actually copies them and tries to solve branch conflicts. And this project is huge. It'd take a really long time... – mcopo Aug 06 '15 at 19:43
  • Hmmm yeah I figured you'd have to copy then delete. Don't know off the top of the head a way that would avoid copy... Up voting question since it stumped me (for now) and to get it more attention. – rholmes Aug 06 '15 at 19:45
  • couldn't you add your `project2` as a subtree, then merge it back to the root repo ? – topheman Aug 06 '15 at 20:02
  • Simply add `project2` as remote of `project1`, then fetch. Now project1 contains all branches (branches do not have to be connected). – knittl Oct 19 '22 at 07:04

0 Answers0