How can you merge two repositories while keeping all commit and contribution history? #75875
-
Select Topic AreaGeneral BodyIf you have two repositories and you want to unify them into one but don't want to lose your contribution or commit history. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello, I am not very familiar with Git, but I did manage to merge two and more repositories into one. (after a few unsuccessful attempts seeking help on the internet, I did manage to get assistance from here). Here's what I did:
Now, all the files showed up in the same folder as
I checked in GitHub Desktop if any changes were left to push and completed the process. In Check the repo I merged in. |
Beta Was this translation helpful? Give feedback.
-
git subtree add is better approach |
Beta Was this translation helpful? Give feedback.
-
Thanks... I will try it...
…On Wed, 7 May 2025 at 23:56, Chandra Rentachintala ***@***.***> wrote:
git subtree add is better approach
—
Reply to this email directly, view it on GitHub
<#75875 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDT3PAG542RBXHVNBCVSNUL25JEFRAVCNFSM6AAAAABL4W4OWWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMBWGY2TGMI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hello, I am not very familiar with Git, but I did manage to merge two and more repositories into one. (after a few unsuccessful attempts seeking help on the internet, I did manage to get assistance from here).
Here's what I did:
I wanted to merge
repo-a
intorepo-b
.I opened
repo-a
with GitHub Desktop (cloned),opened it in VSCode, and accessed the terminal in VSCode (bash).
Now, all the files showed up in the same folder as
repo-b
.I checked in GitHub Desktop if any changes were left to…