Migrate from LFS to annex
Asked Answered
D

1

14

In a moment of delirium before a deadline, I added a large (> 100 MB) binary to a repository with remotes on private hosts as well as github. Of course, github complained, and naively trusting their suggestion, I opted to use LFS.

After two or three commits: my repository reached github's LFS data quota, I had to rename all my remotes to origin, had to explicitly add all my .ssh/config information into git remote set-url for all remotes, and could no longer use any other computers as remotes over ssh*.

My current status is this: Several commits in my main working local repository, a few of which contain LFS files. Up to the last few commits, they have been pushed to github (until I reached quota), which could then be manually pulled from github to my other remotes, but not pushed to them from my local. I cannot bypass github to get my files to the other remotes because of the quota.

How can I clean the repo of LFS so that I can use git-annex? Ideally without fully rebasing from before the first LFS commit, but I imagine that is unavoidable. My question is the inverse, then, of How to migrate from Git-Annex to Git LFS, because I seem to be missing the bandwagon.

I'd be happily convinced that LFS is somehow actually useful for my case.


*I can't find this last issue documented anywhere, only mentioned in this answer and hinted at (but not directly stated) by various error messges. Of course if this were documented I'd never have opted for LFS in the first place, since it makes git effectively centralized again.

Distance answered 8/8, 2017 at 14:29 Comment(2)
Since I am the only one who answered your question, would you consider marking my answer as the correct one ? Unless you have a better answer, In which case I would be very happy to see you post it :)Pragmatics
I find myself also wanting to migrate from git-lfx to git-annex. Were you able to solve this problem, @askewchan?Transponder
P
1

As mentioned in my comment, issues with recovering binaries commited to the git-lfs can be found here.

Even with a commit recovery it seems likely a rebase will be required in order to return the repository to a working condition - ie. being able to push from all the endpoints.

Perhaps the binaries should be stored outside the git solution? When working on projects with large assets (game development), I used to use Dropbox for the larger assets (which gave easy access to other project members), and git only for the code content.

Pragmatics answered 22/2, 2018 at 6:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.