News for hackers. Stuff that matters.
Re:Avoid Git LFS if possible by wokwokwok on Wednesday May 12, 2021 @08:27PM (#27136942)
I despise LFS.

I’m sure that if you know how to use it... maybe... you can figure it out.

That said; here’s my battle story:

Estimate the time it’ll take to move all our repositories from a to b they said.

Us: with all branches?

Them: just main and develop.

Us: you just clone and push to the new origin, it’s not zero but it’s trivial.

Weeks later...

Yeah. LFS is now banned.

LFS is not a distributed version control system; once you use it, a clone is no longer “as good” as the original, because it refers to a LFS server that is independent of your clone.

...also, actually cloning all the LFS content from git lab is both slow and occasionally broken in a way that requires you to restart the clone.

:(

Re:Avoid Git LFS if possible by iab on Wednesday May 12, 2021 @10:34PM (#27137810)
I would rather maintain a handwritten journal of 1s and 0s than use git LFS again
Re:Avoid Git LFS if possible by toomanyducks on Wednesday May 12, 2021 @11:04PM (#27137974)
honestly had no idea what git LFS was before seeing this, but okay then
Re:Avoid Git LFS if possible by tardyp on Thursday May 13, 2021 @04:11AM (#27139653)
You can easily mirror LFS objects by just using

git lfs fetch --all

every modern git hosting servers now have support for LFS directly inside the git server (gitlab, github, gerrit to my knowledge)

This solve the authentication issue nicely so make it easy for developers.

git lfs starts to be adopted by vendors and becomes usable. It solves real problem when you are tired of having to double your git server CPUs every 6 months as your git upload packs are taking huge time trying to recompress those big files over and over.

Re:Avoid Git LFS if possible by blablabla123 on Friday May 14, 2021 @12:30PM (#27156133)
> It solves real problem when you are tired of having to double your git server CPUs every 6 months

Putting blobs into an SCM was always a bad idea, but in git it's particularly bad because the whole tree is always checked out at once. (I think last year a major change was added, that makes blob handling slightly more efficient though)

Still, I think there is still no independently developed git lfs server. I know, most people don't run git servers themselves but in the LFS use case it actually makes sense. There is also git annex which is completely open and free but adoption is very poor and the handling is even more obscure.

Re:Avoid Git LFS if possible by pooya13 on Thursday May 13, 2021 @12:52AM (#27138539)
What is your alternative then? Version control binary files and have your repos grow gigabytes?
Re:Avoid Git LFS if possible by AstralStorm on Thursday May 13, 2021 @01:33AM (#27138768)
If you're rewriting files and need the version history, yes.

If you're not rewriting the files, also yes.

If you don't need the history, put them on a normal web server.

Re:Avoid Git LFS if possible by jmcnulty on Thursday May 13, 2021 @02:35AM (#27139116)
If you need history then still put them on a web server and increment the filenames. Storing large files in a git repo is a misappropriation of the tool. It wasn't designed for that use case.
Re:Avoid Git LFS if possible by carlmr on Thursday May 13, 2021 @03:33AM (#27139398)
I mean for me I'd like the convenience of having it all together. Oftentimes it would suffice if I could just store the current version of a binary efficiently in git. Marking it, so that git forgets the previous versions.

Currently I'm using an artifactory for this, but it would be much nicer if this could be integrated.