Reputation: 68
I have two github repository.
One is client repo and the other is server repo.
client repo is currently in local and server repo is in remote.
I want to manage two repository into one.
How to merge two repo like below?
[branch master]
client-root
[branch dev]
client-root -> 1 -> 2 -> client-HEAD
[branch master]
server-root -> 3 -> 4 -> server-HEAD
[branch master]
client-root
[branch dev]
client-root -> 1 -> 2 -> client-HEAD -> server-root -> 3 -> 4 -> server-HEAD
thank you for reading!
Upvotes: 0
Views: 47
Reputation: 6844
Based on the state you describe, this will create the desired state in your local (client) repo:
git checkout dev
- Switch to dev branchgit cherry-pick ..server/master
- Take all commits reachable from server/master
and put them on top of the current branchUpvotes: 1