← Tous les articles
January 21, 2026

[Gerrit] LFS

Divers

Configuration

On clone le git All-Projects et on récupère le dossier de configuration


git clone http://username@localhost:8080/a/All-Projects
cd All-Projects/
git fetch origin refs/meta/config:refs/remotes/origin/meta/config
git checkout meta/config

Création du fichier de configuration pour lfs


nano lfs.config

On ajoute ceci:


[lfs "^.*"]
        enabled = true

On commit les changements:


git commit -m "lfs config"
git push origin HEAD:refs/meta/config

Dans l'interface de gerrit, on clique sur le tab general, on retrouve maintenant une section LFS dans le projet.

Maintenant, il reste à créer un nouveau projet git qui hérite de All Projects.

Push test


1. git clone Project
2. install lfs for git
3. git lfs fetch --all
4. git remote add  http://user@localhost:8080/a/Project project
5. GIT_TRACE=1 git lfs push --all project master
Thiébault Michaël ©