Does Git LFS support local or "near" secondary storage/cache?
Asked Answered
H

1

14

I'd like to know if it's possible to minimize the download times of large files when using Git LFS.

specifically, the following scenarios:

  • keep files when switching branches
  • allow to get files from a different repository in the same network - (which would be faster than accessing the remote "master" server)

[I know git annex has better support for these features, but it's Windows support is problematic.]

Haygood answered 29/3, 2016 at 17:50 Comment(0)
H
14

To the best of my knowledge Git LFS does keep files when switching branches - its checksum based and holds all blobs locally under .git/lfs/objects once it retrieved them once.

As for pointing lfs to a different endpoint - that's already supported: in your .git/config you can modify the lfs url it points to:

[remote "origin"]
url = https://...<repo_url>
fetch = +refs/heads/*:refs/remotes/origin/*
lfsurl = "https://<another repo that's closer to you>"

Also there are several services that provide lfs support so you can keep the storage on your local corp network like Artifactory, GitHub Enterprise and Bitbucket, depending on what your usecase is.

You might find this issue's conversation helpful as well.

Hinze answered 30/3, 2016 at 6:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.