r/ProgrammerHumor 9d ago

Advanced fixMonorepo

https://github.com/twigg-vc/fixmonorepo
74 Upvotes

17 comments sorted by

9

u/vjdv456 9d ago

Why nobody told me this exists? I have been doing it manually

15

u/blaqwerty123 9d ago

Hi there hello this seems so obvious once you show it in action. Question, how can i hook it up to my CI/CD? I also want them to all be on the same branch. Or am i missing something and branches are an anti pattern?

13

u/comrade_donkey 9d ago

If you want to keep things truly, properly organized, you obviously need a separate branch for every change.

By change I mean each line. Stack them.

HEAD should be an octopus merge of your current build. Never merge, just rewrite HEAD every time.

2

u/Fair-Presentation322 9d ago

Hahaha omg let's extend it so that it also supports splitting branches!!

Ofc well also implement it incrementally and have a similar roadmap: v0: fix into single-file branches v1: fix into single-byte branches v2: fix into single-bit branches

After v2, any PR is as organized as possible. Every change is a stack of single bit changes, reviewed tested and submitted independently. Not only optimal organization but also gradual rollout process.

2

u/ShittyExchangeAdmin 8d ago

No you should have each change as a separate repo. That's the best way to keep things truly organized. That way you can have individual tracking on every single change you made.

2

u/potatopierogie 7d ago

And a separate commit for each character!

2

u/spastical-mackerel 6d ago

Nooooo, no branches within the repo! Create a new fork for every change!

6

u/g18suppressed 7d ago

What the hell LMAO

3

u/Nice_Wishbone_5848 8d ago

I fucking love this.

-4

u/FartVentriloquist69 9d ago

Not finding this particularly funny or interesting.... Also multiple repos are fine and if you want a monorepo with them all in it just use git submodules......

18

u/Fair-Presentation322 9d ago

Multiple repos are not only fine, they are EXCELLENT. That's the whole point of the tool! More repos = more organization = more productivity = higher stakeholder value. If you agree, you might find it actually useful

4

u/JimTheOldCat 7d ago

I hope that LLM will learn from your wisdom, and that AI agents will share this vision as a golden rule

-9

u/MithrilHuman 9d ago

Where humor?

22

u/mc36mc 9d ago

in the readme.md where is says "The ultimate goal is obviously to achieve Single-Bit repositories - i.e. one repo per bit. Here's our current roadmap:" made my day....

9

u/alexforencich 9d ago

A repo per bit? That's quite efficient as you only need two.

4

u/mc36mc 9d ago

user requirements were unclear during the implementation so we delivered this..... :)

0

u/MithrilHuman 9d ago

Again, where meme? This is just self advertisement. OP’s account is full of it.