Enabling LFS involves changes to the All-Projects
project.
For more information about LFS configuration, click here.
-
Run the following commands to enable LFS for a repository. These commands use
certain protocol, username, Gerrit server hostname, repository name and email
address for illustration purposes. You must use your own values and credentials
for your environment. For simplicity SSH is used. You can also use HTTP or
HTTPS.
- git init All-Projects && cd
All-Projects
- git fetch
ssh://admin@ctf-centos72-dev-box.collab.net:29418/All-Projects
refs/meta/config
- git checkout FETCH_HEAD
- git config --file lfs.config lfs."test_repo".enabled
true
- git add lfs.config && git commit --author "Admin
<root@ctf-centos72-dev-box.collab.net>" -m 'Enable LFS for
test_repo'
- git push
ssh://admin@ctf-centos72-dev-box.collab.net:29418/All-Projects
HEAD:refs/meta/config
You can use these commands to enable LFS for a repo by just changing the
repository name in the git config --file lfs.config
lfs."type_the_repository_name_here".enabled true
command.
Verify the LFS configuration for repositories
-
You can verify the LFS configuration directly in Gerrit's user intefrace. Go to and verify the LFS Options section.