- I clone a git repository.
- The repository contains many git lfs files. They're all the placeholders
- Oops! This computer doesn't have git lfs even installed.
- I apt install git-lfs
- I run `git lfs install`
- I run `git checkout .`
- I run `git reset --hard HEAD`
- The files are all still placeholders
- WTF
Conversation
Notices
-
mcc (mcc@mastodon.social)'s status on Wednesday, 14-Feb-2024 13:10:47 JST mcc -
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 14-Feb-2024 13:10:47 JST Foone🏳️⚧️ @mcc git-lfs is a special technology designed to randomly break git without anyone noticing.
-
Foone🏳️⚧️ (foone@digipres.club)'s status on Wednesday, 14-Feb-2024 14:34:39 JST Foone🏳️⚧️ @sndels @suetanvil @mcc the best part is that checking out a repo that uses git-lfs on a system without git-lfs is not an error, but will result in files that don't have the content you expect.
I found this out the hard way at a previous job, where a server automatically checked out a repo and tried to build it, but some previously functional data files were now just URLs. This crashed it, badly
-
sndels (sndels@mastodon.gamedev.place)'s status on Wednesday, 14-Feb-2024 14:34:43 JST sndels @suetanvil @foone @mcc It also fixes the problem of repos being able to be forked trivially.
-
Chris [list of emoji] (suetanvil@freeradical.zone)'s status on Wednesday, 14-Feb-2024 14:34:44 JST Chris [list of emoji] git-lfs fixes the problem of being able to switch branches without a fast network connection.
-