Can this be used to store just some files in AWS S3? #59
Unanswered
cprince-foreflight
asked this question in
Q&A
Replies: 1 comment
-
On 2024-03-05 13:25, Christopher Prince wrote:
In our project we're currently using Github support for Git LFS to
store files. Is it possible to use your setup to use Git LFS for just
some of our files? i.e., to keep the current Git LFS files where they
are.
I think this is possible and a question related to git-lfs itself
rather than to this package in particular. It should be the default
case actually:
`man git-lfs-push`
says:
By default, it filters out objects that are already referenced by the local clone of the remote.
and:
--all
This pushes all objects to the remote that are referenced by any commit reachable from
the refs provided as arguments. If no refs are provided, then all local refs are pushed.
Note that this behavior differs from that of git-lfs-fetch(1) when its --all option is
used; in that case, all refs are fetched, including refs other than those under
refs/heads and refs/tags. If you are migrating a repository with these commands, make
sure to run git lfs push for any additional remote refs that contain Git LFS objects not
reachable from your local refs.
I'm not sure I would recommend that though. Since you would have two
incomplete remotes, `git lfs fetch --all` in particular would probably
not work properly for both remotes, and although I think `git lfs fetch`
should, I'm not entirely sure it would.
Also, in one case I couldn't migrate an LFS repo, but the tests do now
handle this case.
All in all, I would encourage you to go ahead and test this :
- add an lfs-s3 remote
- change the default git-lfs remote
- create an intermediary tag (e.g. last-github-lfs-commit)
- push some dummy git-lfs commits / objects
- most importantly verify that you can do this :
`git lfs fetch --all github last-github-lfs-commit`
`git lfs fetch lfs-s3`
You probably should try this in a dummy repo first, you can take
inspiration from test.sh. If you do and confirm that this works, I would
be glad to include this use-case in the README.
…--
Best regards,
Nicolas Graves
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our project we're currently using Github support for Git LFS to store files. Is it possible to use your setup to use Git LFS for just some of our files? i.e., to keep the current Git LFS files where they are.
Beta Was this translation helpful? Give feedback.
All reactions