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

  • Home
  • SEARCH
  • 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 7185529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:26:10+00:00 2026-05-28T18:26:10+00:00

I have two servers running git, one main instance with gitorious installed and another

  • 0

I have two servers running git, one main instance with gitorious installed and another one on a cloud. I would like to keep them equal. Each push that I perform on my local machine should go to both servers or the main server sync with the cloud. How can I do it? Is there any simple way? Should it be done in my local machine or in the main server?

  • 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-28T18:26:11+00:00Added an answer on May 28, 2026 at 6:26 pm

    You can add multiple URLs to a single remote. What you would need to do is, on your local machine, first create a remote corresponding to the gitorious server:

    git remote add -m master remotename ssh://gitorious-server/path
    

    You’ll have to re-add the URL of the gitorious server as an explicit push URL:

    git remote set-url --add --push remotename ssh://gitorious-server/path
    

    and then do the same for the cloud server:

    git remote set-url --add --push remotename ssh://cloud-server/path
    

    This should set up a configuration where every time you execute git push locally, your changes will be pushed to both servers. But when you run git pull (or git fetch), it will only fetch from the gitorious server. This should be all that is needed, if the servers are to stay in sync.

    If you only ever push to either server from this one particular local machine, then that’s all you need. But if you push to one or the other server from any other computers, you will need to do the same configuration on each of those other computers. If there are enough computers that this gets unwieldy, or if other people have write access to the two repositories and you don’t absolutely trust them to get the configuration right, you’re probably better off doing something server-side. This would be the post-receive hook method that manojlds mentioned. To be clear, if you are using the post-receive method, do not use the dual-URL remote method described in the earlier part of my post.

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

Sidebar

Related Questions

if i have two IIS servers 5v on one network running winxp each hosting
We have two zope servers running our company's internal site. One is the live
I have one table spread across two servers running MySql 4. I need to
I have a rails application running over Postgres. I have two servers: one for
I have two servers: one running a django app and one running both a
I have two servers, both running CentOS 5.7 and cPanel-CURRENT. One is x86 and
On my Unix web server, I have two MySQL database servers running. One on
I have two IIS servers running using NLB. Unfortunatelly I cannot use shared session
I have two servers where I installed SQL Server 2008 Production: RAID 1 on
I have two servers - one Django, the other likely to be written in

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.