0

I have used github duplicate option with --bare in clone and uploaded to a different account in github.com

Used as in this link

Just as a process to handover the project to another team.

But there are recent changes in the original repository, how to sync those changes there, all branches.

user2331760
  • 155
  • 4
  • 12

1 Answers1

1

One option is clone as bare repository and fetch the changes from original repo whenever there are changes.

git clone --mirror https://primary_repo_url/primary_repo.git
git fetch origin

Then, add the other new repo as another remote and push it to that repo whenever there is changes to sync.

cd primary_repo.git
git remote add --mirror=fetch secondary https://secondary_repo_url/secondary_repo.git

git push secondary --all

For more details and other options, I followed this link

uday kiran
  • 56
  • 5