this post was submitted on 09 Oct 2025
863 points (99.4% liked)

Programmer Humor

26817 readers
3181 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
top 35 comments
sorted by: hot top controversial new old
[–] CIA_chatbot@lemmy.world 145 points 2 days ago (4 children)

Ok, well I was looking for a new project - guess I’m making git-ar hero now

[–] criss_cross@lemmy.world 37 points 2 days ago (2 children)

Is the goal to make branch commands that match a specific song? That’s be fun.

[–] rtxn@lemmy.world 41 points 2 days ago (1 children)

Use the guitar controller to branch, commit, and merge to the beat of Through The Fire And Flames and try to get a conflict-free repo.

[–] toynbee@lemmy.world 9 points 2 days ago (1 children)
[–] rtxn@lemmy.world 3 points 1 day ago (1 children)
[–] foodandart@lemmy.zip 1 points 1 day ago

Jazz 2.0 just dropped

LOL!

That or Progressive Acid Folk.

[–] foodandart@lemmy.zip 7 points 2 days ago

Dad joke for coders? Ooooo... you!

[–] naeap@sopuli.xyz 3 points 1 day ago* (last edited 1 day ago)

Next version git-tar hero, where you also need to take care of the tar process

Although I don't have a realistic direct use case, I thought the name and complexity of the game should be worth it

[–] rirus@feddit.org 2 points 1 day ago (1 children)
[–] mere@lemmy.blahaj.zone 1 points 4 hours ago

HOLY SHIT THAT'S SO GOOD??

[–] Everyday0764@lemmy.zip 24 points 1 day ago (2 children)

in the projects i work in i always try to force semi linear history to avoid all of this, never merge (unless it's the MR) always rebase.

this leaves a very readable history, with each feature branch highlighted and no mixture in the commits...

i haven't found any downside yet... maybe that some ci/cd are built to push to main, but making them do branch pr automerge is not that difficult

[–] theneverfox@pawb.social 5 points 1 day ago (2 children)

How does a rebase play out? I know what it is conceptually, but usually just do the difficult merges myself

[–] AnyOldName3@lemmy.world 9 points 1 day ago (1 children)

Instead of git history, you get a git fairy tale. Practically, the merge conflicts and their resolutions get spread across one or more commits on the branch that was rebased, and the history makes it look like all the work was done after the upstream commit(s) that there was a conflict with. This can be much tidier, but also loses the context of changes. E.g. you can no longer see that something is done differently to everywhere else that does the same thing not because it needs to do it differently, but because it copied and pasted something from ten lines above and the thing ten lines above received a bug fix on another branch which the feature branch was rebased onto. Based on my experience working on large projects that used both approaches, I'd rather scroll past extra commits and squiggly branch lines than try to reconstruct what someone was thinking when they made a mistake without access to the original commit they made the mistake in. If I had to allow history-rewriting operations in git, the one I'd pick would be rewriting the history of Earth so that when history rewriting operations were implemented in git, they defaulted to adding some metadata to the rewritten commits making the operations reversible so I could decide I wanted the real history back.

[–] theneverfox@pawb.social 4 points 1 day ago (1 children)

Having read through these replies, I'm leaning towards your thoughts on this. It does exactly what I thought it did, and I'm just not seeing the upside

I think I'm going to just push more strictly following feature branches

[–] Hudell@lemmy.dbzer0.com 1 points 10 hours ago

The upside is that a beautiful lie is often preferred over an ugly truth.

[–] UnrepentantAlgebra@lemmy.world 5 points 1 day ago (1 children)

It's basically like you check out the destination branch and cherry pick your changes on top of it.

I don't know if there is a functional difference between a merge and a rebase assuming your git history is reasonable, but rebasing makes the history so much easier to follow. Every commit only has a single ancestor, commits are generally better structured because devs where I work tend to squash and rebase.

[–] theneverfox@pawb.social 3 points 1 day ago (3 children)

I get that theoretically... But does it like, just work automagically?

Like, I'm the git guru on my team, and we're about to start a new project larger than what we've done before. My teammates are old school and don't get git

Is frequent rebasing something I should push for? A clean history is nice, but I've just won them over on feature branches... Is this something quick and easy that would improve our quality of life?

[–] zalgotext@sh.itjust.works 4 points 1 day ago* (last edited 1 day ago)

Is frequent rebasing something I should push for? A clean history is nice, but I've just won them over on feature branches... Is this something quick and easy that would improve our quality of life?

Realistically, in the short term, no. If neither you nor any of your team members are familiar with rebasing or rebase-based workflows, you will encounter problems that no one will know how to solve without researching. That'll lead to frustration, and before you know it those old school teammates that don't get git will fall back into using svn, or zip files with names like final_project_v1.2_final_final (copy)

I recommend getting familiar with rebase- and merge-based workflows on your own first, like on your own projects/private repos, and reading through the git documentation. Once you become more of an expert, you might be able to teach your teammates how to be proficient at using git, or at bare minimum, you'll be able to help them unfuck themselves when they inevitably fuck their repos up.

[–] kewjo@lemmy.world 3 points 1 day ago

it's great if your commits are smaller and more focused. main issue is it can be harder to solve some diff issues as it requires solving merges at each commit being rebased. so if you have a large feature branch that can be challenging when it starts to diverge a lot (ex: bug fixes on main). though the argument then is more for keeping branches smaller and focused which is a better process imo.

just beware it can be confusing for newer git users and when using shared branches can cause no ff commits.

[–] Traister101@lemmy.today 1 points 1 day ago

It can. It depends on what changed. If both of you touch the same file in a conflicting way you'll have to merge the commit with the conflict. If you don't then it just auto magically works.

For example if you have commits A - B - C with a branch A - D with D adding a brand new file you can trivially rebase (IE no need to merge) D onto C for a history of A - B - C - D

The best part about rebasing imo is that you get to merge commit by commit. Using the previous example if there's a conflict in commit B but nothing in C all you have to do is fix commit D to handle the changes B made, nothing else

[–] qqq@lemmy.world 24 points 1 day ago* (last edited 1 day ago)

Look at this person over here using branches, show off

[–] AnimalsDream@slrpnk.net 7 points 1 day ago

At least twelve lanes on a single track. If I recall, the cool keytar instrument you could get for... was it Rock Band 3? might be able to make a song with that track in it. Not sure how many other games or instruments could do that though.

[–] cronenthal@discuss.tchncs.de 23 points 2 days ago (1 children)

I've seen worse ... so much worse.

I have made worse, I used to do a cascading merge everyday to move stuff from dev branches to staging to production. Then I did a merge in the opposite direction for a small selection of branches so they could get their updates from staging. Feature branches were rebased as needed.

[–] rtxn@lemmy.world 14 points 2 days ago* (last edited 2 days ago) (1 children)

I wonder if anyone's tried to play Bad Apple! on the branch graph.

(edit) Not exactly, but close. https://www.youtube.com/watch?v=-I8Jis87nmE

[–] Opisek@piefed.blahaj.zone 2 points 1 day ago

You, kind sir, are giving me ideas...

[–] tdawg@lemmy.world 4 points 1 day ago

Trunk based: am I a joke to you

[–] fossilesque@mander.xyz 1 points 1 day ago

Lmao still nicer than mine.

[–] xia@lemmy.sdf.org 3 points 1 day ago

Nah, just sort by date instead of topology, or vice versa.

tomfoolery, even

[–] HowAbt2day@futurology.today 4 points 1 day ago (2 children)

Can someone please play this in the guitar (or sitar?) and share it here?

[–] tdawg@lemmy.world 1 points 1 day ago

Yeah lemme just grab my squints thirteen string guitar