git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git Master Master Replication

From
Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
Date
May 8, 2010, 17:44 UTC
Message-ID
<n2y86ecb3c71005081044pae211c37lc01ddc5f9f2ff146@mail.gmail.com>
In-Reply-To
<o2tc2f2fad1005080341z42b389e0i791c6c7a02dee5e5@mail.gmail.com>
On 8 May 2010 11:41, amitesh kumar <amitesh.a.kumar@gmail.com> wrote:
Show 8 quoted lines
> Hi im working on a project the will be deployed in many countries,
> Is it possible with Git to host n masters?
> Can any change on a particular master be propagated to others?
>
> I have had a look at Gerrit2 but it only looks one way.
>
> Cheers
> Amitesh

In one git repository you can have only one branch with exactly the same ref e.g. refs/heads/master.

By editing .git/config you can setup unlimited amount of locations of where to pull from and where to push to (and you can pull from many locations to a same branch and push one branch to many locations)

[remote "server-uk"]
      push = +refs/heads/master:refs/heads/master
      push = +refs/heads/uk/*:refs/heads/*
      pushurl = bla.co.uk
Similarly you can specify pulls using * or specifing each one.

.git/config is extremly flexible I'm sure you can make it work with any amount of remotes =)

hope this helps.
Previous: amitesh kumar
Message 2 of 2 in “Git Master Master Replication”
  1. amitesh kumarMay 8, 2010
  2. Dmitrijs LedkovsMay 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.