I hope this does not seem to obvious. I have two git repository. We decided to split one branch from the first repoistry into a git sub module. Now I have been using this sub module, however people have been pushing commits to the first repository into the branch that was made into a sub module.
How can I merge the changes from the branch in the first repository into newly created second repository? (Which we now use as the sub-module)
I have tried adding another remote into the second repo and merging that branch across, using:
git remote add otherOrigin [email protected]:originalRepo.git
git merge otherOrigin originalBranch
However I get:
fatal: 'otherOrigin' does not point to a commit
Thanks
If the two repos, for the given branch (the one split as a sub-module in Repo1, while being kept in Repo2), initially have a common history, then it should be possible, in theory, to:
But that can quickly become a drag if you have to repeat that process on a regular basis (unless you can script it).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With