Senthil A Kumar
Senthil A Kumar

Reputation: 11214

Mirror Gerrit maintained Git repositoty

I have a bare repository A.git with 1500 branches not under Gerrit and resides in Host 1

I have a the same bare repository A.git with 2000 branches under Gerrit and resides in Host 2

The 500 extra branches in A.git under Gerrit might be branches that users have pushed or reviews/changes etc. I don't need these branches and should be pruned.

So the replication from source A.git (Host 1) to dsetination A.git under Gerrit (Host 2) should mirror all the changes exactly and should also prune the extra 500 branches on the destination (Gerrit). BUt refs/meta under A.git in Gerrit should be excluded from pruning as it is required for Gerrit recognizing the repository properly.

A.git -> A.git (Gerrit). All branches from source should be synced to destination and extra branches in destination (Gerrit) should be prune.

The push --mirror option didn't work as it tries to delete refs/meta and also throws some internal error - permission denied error something.

Upvotes: 1

Views: 332

Answers (1)

Flows
Flows

Reputation: 3863

As Marcelo mentioned, you can use replication plugin. This allow you to duplicate any git repository when a patch set is submitted under Gerrit UI.

Official documentation

Upvotes: 0

Related Questions