Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6637899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:22:12+00:00 2026-05-25T23:22:12+00:00

We have: Remote repository with some project. Several remote repositories, which I want to

  • 0

We have:

  1. Remote repository with some project.
  2. Several remote repositories, which I want to synchronize with previous one.

When something pushed in first project (1), I need to pull these changes to other remote repositories (2).

I can pull from first repo and push to destination repositories.

What is the simplest way to do this ?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:22:13+00:00Added an answer on May 25, 2026 at 11:22 pm

    You could clone a new bare mirror repository from the upstream repository that you have no control over, e.g. with:

    git clone --bare --mirror git://github.com/whoever/whatever.git
    

    (In fact, --mirror implies --bare, so --bare isn’t strictly necessary.) The --mirror option says that rather than just take the local branches from the remote and make them remote-tracking branches, git should mirror all the branches from the remote repository with the same names.

    Then, you can set up a frequent cron job that runs the following commands in that repository:

    git remote update
    git push --mirror --force repo1 
    git push --mirror --force repo2
    

    This assumes that you’ve added repo1 and repo2 as remotes, and that they point to bare repositories that you’re only wanting to use as mirrors. (The latter requirement is because you’re using --force, so if other people are pushing their work to repo1 or repo2, it’ll get overwritten by the automated mirror pushes.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have commits that are in a remote repository (origin/master) which i want to
I have a remote git repository and I have cloned one branch git clone
I'm using a local Git project repository, and have created a remote repository followed
For a java/scala project I have some dependencies that are not in a remote
I have an active project with some sensitive files and directories. I want to
Suppose a remote SVN repository has this structure: /project /src /bulk Now for some
I have my project on GitHub at some location, git@github.com:myname/oldrep.git . Now I want
I have some Ant tasks in my Eclipse JDT project that I want to
There is remote bazaar repository. There I have to add a new project in
I was working in one project file detached from the remote repository for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.