I’ve been testing a git/Gerrit integration and setup a test repository that is mirroring a remote repository. When I cloned the repository within the GERRIT_SITE/git directory I executed the following command to make sure that it mirrored the remote repository:
git clone --mirror REPO_URL
I checked the config file within the bare repository:
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
fetch = +refs/*:refs/*
mirror = true
url = ssh://git@myserver/testing.git
I was able to merge a change within Gerrit and the branch says “master”. However, when I try to pull down the latest changes from the master branch of the remote repository on a different workstation, it says “Already up-to-date”. Are there any other configurations that must be done to make sure that changes in Gerrit get pushed to the remote repository?
Gerrit does not support working with an upstream master currently. Gerrit is the master. It supports replication, so that merged changes can be pushed to other servers for backup or mirroring purposes. However, if other changes are made to the remote repository, replication will fail.