Hi,
On 07.07.2014 14:24, gjarms wrote:
> Dear Gerrit experts,
[...]
> Is it possible to simulate gerrit replication using git only?
git "replication" basically boils down to "git fetch" plus "git push".
You get a nice example if you start a git clone with the --mirror
option: "git clone --mirror".
git replication is just a matter of having "remotes" (repositories on
different url's) and "refspecs" (which sha1's to fetch and push).
--- example of .git/config for replication -----
[remote "origin"]
fetch = +refs/*:refs/*
#fetch = +refs/heads/*:refs/heads/*
#fetch = +refs/tags/*:refs/tags/*
mirror = true
url =
https://github.com/UPSTREAM/PROJECT.git
[remote "mirror"]
fetch = +refs/*:refs/*
mirror = true
url = g...@github.com:MIRROR/PROJECT.git
------------------------------------------------
git fetch upstream; git push mirror
In order for learning git "repliction" the manual on "git fetch --help"
and/or "git push --help" might be worth reading.
I think gerrit replication just applies permission checks on top of
regular git replication.
Greets,
Peter