[Solved] Sync two git repositories [duplicate]


You should use --mirror. This will sync your new reposoitory.

Instead of naming each ref to push, specifies that all refs under
refs/ (which includes but is not limited to refs/heads/,
refs/remotes/, and refs/tags/) be mirrored to the remote repository.
Newly created local refs will be pushed to the remote end, locally
updated refs will be force updated on the remote end, and deleted refs
will be removed from the remote end. This is the default if the
configuration option remote..mirror is set.

Use the following command:

git push --mirror my-new-remote-origin

Documentation found here.

5

solved Sync two git repositories [duplicate]