Configure Gerrit with Git LFS examples please

Viewed 3785

Could someone please provide examples of how you configured Gerrit to work with Git LFS? I understand that $GERRIT_SITE/etc/gerrit.config must be modified (I'd appreciate a good example here).

On top of that, I think that each project (Git repo) requires configuration, but I'm not sure if that is done through the command line or via entries in other configuration files.

Thanks in advance.

1 Answers

1) Install Plugin

2) Configure GERRIT-SITE/etc/lfs.config

[storage]
    backend = fs
    directory = xxxxx <= Default: $GERRIT_SITE/data/lfs

3) Configure GERRIT-SITE/etc/gerrit.config

[lfs] plugin = lfs

4) Configure all-projects

git clone https://USER@GERRIT-SERVER/a/All-Projects
git fetch origin refs/meta/config
git checkout FETCH_HEAD
vi lfs.config

[lfs "^.*"]
    enabled = true
    maxObjectSize = 50m

git commit -a
git push origin HEAD:refs/meta/config
Related