this post was submitted on 06 Oct 2025
842 points (96.8% liked)

Programmer Humor

26898 readers
1267 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
 

Yeah learned this the hard way.

you are viewing a single comment's thread
view the rest of the comments
[–] sorter_plainview@lemmy.today 6 points 1 week ago* (last edited 1 week ago) (1 children)

So this workflow is needed if you are working on a public, i.e. multiple devs collaborating on a single branch, scenario. But it is much better to avoid this as much as possible. Usually it is a 'scoping' issue, where you create a branch that is too broad. For example 'api-for-frontend', which is a massive thing.

But let us say you absolutely have to get multiple devs on same branch, then this workflow is totally fine. There is nothing wrong in it.

In our org we prefer to delete the branch after merge. In a way it says 'this branch is closed'. This is to encourage devs to define smaller and more logically scoped branches.

I want to take this opportunity to say that, branch is just a label on a commit, with some additional functions. Once you start focus on commits and lineage of the commits, then branches become some what irrelevant.

[–] pmk@lemmy.sdf.org 2 points 1 week ago (1 children)

Aha. I was part of a project where each dev had their own long running branch for non-specific work and this was the norm, but it always felt clunky. And often resulted in merge issues.

[–] sorter_plainview@lemmy.today 2 points 1 week ago (1 children)

That is a very weird setup. I have no clue why that flow is needed in the first place. Branches should be something disposable easily. What was the logic behind the setup? Any idea?

[–] pmk@lemmy.sdf.org 2 points 1 week ago

Oh I know the reason, nobody knew git and had just worked alone before.