Prevent creating branches other than main

2 years ago by Drew to c/programmingcirclejerk

EfreetSK 21 points 2 years ago

From the comments:

I can't wrap my mind around 10 people pushing changes to main all the time. It feels like a merge-conflict-rollback-preventing nightmare to me.

That's ... literally what one of my colleagues is unironically advocating for over a decade. Despite us trying to explain to him that this might work for team of 2-3 people but is really a bad idea for team of 10+ developers, 5 or so testers, POs needing guarantee that they can deploy at any time and tools like Gitlab/Github. Thankfully we overruled him few years ago

path: 0 15203082, hotness: undefined, score: 21, children: 1
vzq 1 point 2 years ago
path: 0 15203082 15203420, hotness: undefined, score: 1, children: 0
vzq 14 points 2 years ago

This is obviously crazy talk, but so is keeping feature branches alive over extended periods of time. Depending on the development tempo of your project and the number of people involved, you should figure out a way to land things into main (in pieces if needed) within a few days.

path: 0 15203357, hotness: undefined, score: 14, children: 3
Landless2029 4 points 2 years ago

Or never killing branches... I've been on projects with over 100 branches.

path: 0 15203357 15210100, hotness: undefined, score: 4, children: 0
tatann 3 points 2 years ago

Feature flipping

path: 0 15203357 15203399, hotness: undefined, score: 3, children: 0
ulterno 1 point 2 years ago

I had created a feature branch before leaving my previous company, completed the feature and uploaded a build for testing, after which it was supposed to be merged.

Months passed and it has still been neither merged nor rejected.

path: 0 15203357 15210931, hotness: undefined, score: 1, children: 0
KickMeElmo 6 points 2 years ago

That hurts my soul.

path: 0 15202942, hotness: undefined, score: 6, children: 0
onlinepersona 3 points 2 years ago

Any CVS and SVN lovers in chat? Those were the days, eh? Got and mercurial were a mistake. Bring back the good old days 😭😭😭

/s

Anti Commercial-AI license

path: 0 15204289, hotness: undefined, score: 3, children: 3
vzq 5 points 2 years ago

Back during the master/main debate I proposed going back to “trunk”, but there were too few of us old farts to make it stick.

That said, I didn’t miss subversion and CVS even a bit. They were rough compared to modern source control. I did like both hg and bazaar better than git though.

path: 0 15204289 15216156, hotness: undefined, score: 5, children: 0
Jesus_666 3 points 2 years ago

Real men use classic TFS. Real men then pursue a career in a different field so they don't have to use TFS anymore.

path: 0 15204289 15204707, hotness: undefined, score: 3, children: 1
NostraDavid 1 point 2 years ago
path: 0 15204289 15204707 15211149, hotness: undefined, score: 1, children: 0
FizzyOrange 1 point 2 years ago

What is even the motivation for this? How do you make PRs?

path: 0 15203481, hotness: undefined, score: 1, children: 5
crmsnbleyd 10 points 2 years ago

That's the neat part: you don't

path: 0 15203481 15203682, hotness: undefined, score: 10, children: 1
FizzyOrange 3 points 2 years ago

A joke presumably? Kind of hard to tell!

path: 0 15203481 15203682 15204111, hotness: undefined, score: 3, children: 0
onlinepersona 6 points 2 years ago

It's called "trunk based development". Look it up and watch videos about it. I swear they are stuck in the 90s yearning for CVS and SVN.

Anti Commercial-AI license

path: 0 15203481 15204278, hotness: undefined, score: 6, children: 2
brian 2 points 2 years ago

trunk based development generally still merges branches into a main one, see this. idk if only using main even has a name

path: 0 15203481 15204278 15228451, hotness: undefined, score: 2, children: 1
onlinepersona 2 points 2 years ago

Trust me, people still call it trunk based development. Just like "agile" has many forms, trunk based development does too.

Managers will often read about some process, tech, or strategy and tout it as the solution to their problems without understanding context nor wanting to invest in what's actually required for a successful implementation. For example trunk based development should have automated testing, a deployment and a fallback strategy. And if you're working on something with hefty features that you can't slice, feature flags or something similar are probably required. Not giving the team time to develop a strategy to implement that is a great way to mess up a product.

Anti Commercial-AI license

path: 0 15203481 15204278 15228451 15232321, hotness: undefined, score: 2, children: 0
crmsnbleyd 1 point 2 years ago
path: 0 15213020, hotness: undefined, score: 1, children: 0
x00z -3 points 2 years ago

master*

path: 0 15203662, hotness: undefined, score: -3, children: 0
NostraDavid -6 points 2 years ago
path: 0 15211130, hotness: undefined, score: -6, children: 4
vzq 3 points 2 years ago

Scary woke branch name triggered you? Need to get back to your safe space?

path: 0 15211130 15216111, hotness: undefined, score: 3, children: 3
FizzyOrange 6 points 2 years ago

I dunno about NostraDavid, but I don't object to main as a name. It's an obviously better name (let's be honest Git is terrible at naming). If it had been the name from the start it would have been fine.

The problems are a) changing the name was - and continues to be - a persistent minor pain, and b) it was changed for really really stupid reasons! Mainly the latter. It's painful when people are being idiots even if it doesn't directly affect you.

It's kind of like my objection to religion (at least Christianity in the UK). It's not really doing any harm, but it's just so stupid. (I don't blame Christians; I was raised one so I know first hand how it tricks you into belief.)

path: 0 15211130 15216111 15216424, hotness: undefined, score: 6, children: 1
NostraDavid 2 points 2 years ago
path: 0 15211130 15216111 15216424 15237181, hotness: undefined, score: 2, children: 0
NostraDavid 1 point 2 years ago
path: 0 15211130 15216111 15237150, hotness: undefined, score: 1, children: 0
programmingcirclejerk
programmingcirclejerk

@programming.dev

login for more options
304
53
1

Community to talk about enlightened programming takes

Rules:

  • read and follow the programming.dev code of conduct
  • no flamewars
  • mark your unjerks
  • only programming related content allowed
  • link to the original source
  • do not mention this community in places like hackernews, lobste.rs, or the general programming communities on Lemmy where we source jerk material from.

go to feed...