askewchan
askewchan

Reputation: 46530

Migrate from LFS to annex

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.

Upvotes: 14

Views: 865

Answers (1)

Rann Lifshitz
Rann Lifshitz

Reputation: 4090

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.

Upvotes: 1

Related Questions