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 6539673
In Process

The Archive Base Latest Questions

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

I have git repo servers at different locations around the country. When I move

  • 0

I have git repo servers at different locations around the country. When I move to one of those locations, I’d like to use the local server for push/pull. This is managed simply by modifying the .git/config and changing the origin branch. At the same time, I’d like all branches and tags pushed to that local server to be replicated across all the git repositories on other servers.

What is the best way to go about setting this up?

Should I modify the .git/config to include a remote “all” that has the url to each server? This way every time I do a git push all it will push to all servers.

Should I add in post-commit hooks to each git repo server to push to the other servers? This then requires no additional setup for the client side, as they simply need to push to any of the servers.

What about git clone --mirror? Will this help achieve the clustering effect?

  • 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-25T10:53:13+00:00Added an answer on May 25, 2026 at 10:53 am

    You should do it server side as much as possible so as not to burden the committer with any overhead. You have to be careful about recursion with post commit hooks. If all servers push to all others on commit you can end up in a case where all severs continue to push to each other. However, you can use this to your advantage. Each server only needs to worry about the server to it’s virtual right. For example, A -> B -> C -> D -> … A. If each server has a post commit hook to first see if the next server is up to date and the push to it if not, push it then eventually all servers will be in sync. So server A pushed to B which pushes to C which pushes to D which checks to see that A is up to date so does nothing.

    You’ll probably end up with edge cases this way and have to worry about pushes that fail to other servers, but the next commit will sync it up.

    You can also just use rsync.

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

Sidebar

Related Questions

I currently have a local clone of a repo from our company git server.
I have a git clone/repo on a development server, but I am now moving
I have a hosted git repository in my own server and my git repo
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a
So if I have a Git repo on my local machine and I send
I have a local git repo, and I have a remote git repo. What
I have been using git to push my local code to a server. I
I have a git repo hosted on my server using gitosis. I had branches
thanks for any help. I have a git repo on my local machine (mac
I have a problem with with remote git repo and local repo (using SmartGit).

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.