0

I have two git-repositories:

  • The main one from the customer
  • A second one used by a subcontractor of the customer

The customer only provides one account to access the repository but the subcontractor has several developers also working on the same project. Therefore there is a second repository.

What I need to do is to merge both repositories periodically.

What's best practice to achieve this? Using an additional remote? Or a solution like this (https://stackoverflow.com/a/17313342/1623426) ?

xforfun
  • 592
  • 6
  • 19

1 Answers1

0

I am not certain of your question. You have 2 repositories:

  • main Accessible by you and the customer
  • subcontractor Accessible by several developers and you

To keep track of the changes in both repositories, you should use additional remotes:

git remote add origin http://git.company.com/main.git
git remote add alt http://git.subcontractor.com/project.git

Then you can easily keep track of changes by using git fetch --all

In addition, you would be easily able to merge changes from the subcontractor into the main repository.

nowox
  • 25,978
  • 39
  • 143
  • 293