News for hackers. Stuff that matters.
Re:We Put Half a Million Files in One Git Repository, Here’s... by fomine3 on Thursday June 16, 2022 @01:25AM (#31762695)
I don't think it's good idea to store cache in Git. Any file remains forever in the repository after once committed. Local/remote repository become unnecessary big.
Re:We Put Half a Million Files in One Git Repository, Here’s... by kadoban on Thursday June 16, 2022 @01:48AM (#31762799)
The bigger issues for me are it makes history impossible to read (every change is hidden in an avalanche of crap), merges are a mess (you definitely want to spend forever merging autogened files, right?), PR reviews are annoying, etc.
Re:We Put Half a Million Files in One Git Repository, Here’s... by Gigachad on Thursday June 16, 2022 @01:51AM (#31762810)
Depends how much generated stuff is there. We have our graphql schema in git even though its auto generated via a library. But its useful in PRs to see exactly how the schema changed as a result of the root change.
Re:We Put Half a Million Files in One Git Repository, Here’s... by kadoban on Thursday June 16, 2022 @02:23AM (#31762983)
Yeah if there's not a lot of it, and if it's easy to regenerate, it can be fine.
Re:We Put Half a Million Files in One Git Repository, Here’s... by _ikke_ on Thursday June 16, 2022 @02:55AM (#31763182)
You may want to set the '-diff' attribute for these files so that git will not show diffs for these, instead it will show 'Binary files differ'.

There is also '-merge', which will cause git to not attempt to merge the contents, but just ask you to pick a side.

The challenge however is then verifying the contents of these files in things like merge requests.

See https://gitirc.eu/gitattributes.html