I have two repositories I'd like to merge. Both are on github and the goal is to take the other person's repository and merge it onto mine. Keeping anything that is in mine but not theirs and anything new in theirs overwriting stuff in mine. But I would like to do this for every branch, the whole thing. How do I do that?
Asked
Active
Viewed 56 times
0
-
Do you mean that you want only their commits and you don't want their changes? – ElpieKay Jan 22 '20 at 06:00
-
@ElpieKay I don't understand what you mean. I want all commits and changes from the other repository layered onto mine. Keeping any changes that mine has that the other doesn't. Mainly everything except for a few files and folders that the other doesn't have. – RansuDoragon Jan 23 '20 at 07:49
1 Answers
0
Possible duplicate of this: How do you merge two Git repositories?
You can also checkout this: https://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/

Aditya Malviya
- 1,907
- 1
- 20
- 25
-
This seems to deal with the master or origin. What I'm confused is, what about also merging all the branches? if repoA has 20 branches and repoB has 25 branches, 20 of those branches being the same name and purpose. Do I have to checkout each branch separately, merge, and commit? – RansuDoragon Jan 23 '20 at 10:58