0

I have two version control systems. One is on GitLab at my local institute. The other one goes public, on GitHub. So I have two repositories for my project:

On GitLab, I have a history of commits like this:

commit c:
commit b:
commit a:

On GitHub, I have a history of commits like this:

commit f:
commit e:
commit d:

I know that a and d are the same version I pushed to both GitHub and GitLab. Now I have someone developed new features on GitHub with commit f and e. And I also have developed new things on GitLab with commit b and c. How to merge the commit f and commit c on both GitLab and GitHub? Is there a way to merge all the record of commits to get something like this:

On GitLab:

commit g: the merged version of c and f'
commit f': the same version as commit f on GitHub
commit e': the same version as commit e on GitHub
commit c:
commit b:
commit a:

On GitHub

commit h: the merged version of c' and f
commit c': the same version as commit c on GitLab
commit b': the same version as commit b on GitLab
commit f:
commit e:
commit d:

And now h and g are the same again.

f. c.
  • 744
  • 6
  • 14
  • 1
    You merge two branches like you always merge two branches. It doesn't matter if the remotes are hosted at GitHub or gitlab or anywhere else. – mkrieger1 Nov 24 '20 at 13:09
  • @mkrieger1 Sorry, my mistake. For historical reasons, these are not one repository with two branches, but two separated repositories. But I do know that commit `a` and `d` are the same. Does it make sense to you? – f. c. Nov 24 '20 at 13:13

0 Answers0