Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Gerrit with Git LFS examples please

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.

like image 330
SteveK Avatar asked Nov 01 '18 13:11

SteveK


People also ask

How do I Set Up Git LFS?

Once git-lfs is on your path, run git lfs install to initialize Git LFS (you can skip this step if you installed Sourcetree): $ git lfs install Git LFS initialized. You'll only need to run git lfs install once. Once initialized for your system, Git LFS will bootstrap itself automatically when you clone a repository containing Git LFS content.

How do I add personal information in Gerrit Git?

Gerrit - Configure Git. Once you have installed Git, you need to customize the configuration variables to add your personal information. You can get and set the configuration variables by using Git tool called git config along with the -l option (this option provides the current configuration).

How to install Git-LFS?

Installing Git LFS 1 There are three easy ways to install Git LFS:#N#a. Install it using your favorite package manager. git-lfs packages are... 2 Once git-lfs is on your path, run git lfs install to initialize Git LFS (you can skip this step if you installed... More ...

What is Git LFS pull?

Like git lfs clone, git lfs pull downloads your Git LFS files as a batch. If you know a large number of files have changed since the last time you pulled, you may wish to disable the automatic Git LFS download during checkout, and then batch download your Git LFS content with an explicit git lfs pull .


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
like image 155
Marcelo Ávila de Oliveira Avatar answered Sep 20 '22 05:09

Marcelo Ávila de Oliveira