Configure Gerrit with Git LFS examples please

旧时模样 提交于 2020-06-12 05:33:42

问题


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:


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


来源:https://stackoverflow.com/questions/53102564/configure-gerrit-with-git-lfs-examples-please

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!