this post was submitted on 20 Aug 2024
612 points (88.6% liked)

Showerthoughts

29528 readers
768 users here now

A "Showerthought" is a simple term used to describe the thoughts that pop into your head while you're doing everyday things like taking a shower, driving, or just daydreaming. The best ones are thoughts that many people can relate to and they find something funny or interesting in regular stuff.

Rules

founded 1 year ago
MODERATORS
 

It sounds way less offensive to those who decry the original terminology's problematic roots but still keeps its meaning intact.

you are viewing a single comment's thread
view the rest of the comments
[–] aodhsishaj@lemmy.world 3 points 2 months ago* (last edited 2 months ago) (15 children)

Is it not the main working branch? Git is a system of change not just recording change. When you start a new project, do you open a new branch or create a whole new repository? That's not rhetorical I'm genuinely curious.

[–] SpaceCadet@feddit.nl 13 points 2 months ago (12 children)

Is it not the main working branch

No it is not. On large distributed projects for which git was designed, you typically don't directly work on main/master but you create a working branch to do your changes, and when they are ready you merge them to main/master.

There are many types of git workflows, but main/master usually contains the code that is deployed to production or the latest stable release and not some work in progress.

When you start a new project, do you open a new branch or create a whole new repository?

You have to define "project" for that.

  • Is your project a change to existing code -> new branch, merge to main/master when done
  • Is your project something new that stands entirely on its own? -> new repository
[–] aodhsishaj@lemmy.world 0 points 2 months ago (10 children)

Ah we develop the same way. There's testing then staging then prod is final review and is then finally merged to Main after documentation. Main branch is protected and merges are gated by review. There's no need for master terminology there.

[–] Omniraptor@lemm.ee 1 points 2 months ago (1 children)

Wait huge? Shouldn't Prod be the last place any changes go ?

[–] aodhsishaj@lemmy.world 1 points 2 months ago* (last edited 2 months ago) (1 children)

In our environment Prod is only a holding area, the change/feature/bugfix is already approved for production, once the change is documented then the merge happens into main and Prod is consumed.

Our "working" branches are ephemeral.

[–] AA5B@lemmy.world 1 points 2 months ago (1 children)

Seems like what we use “RC” for (Release Candidate)

[–] aodhsishaj@lemmy.world 1 points 2 months ago* (last edited 2 months ago) (1 children)

Yeah, we're trying to avoid a lot of hanging branches with no documentation so we try to prune as much as possible. So we built pruning and documentation into the workflow of the pipeline.

[–] AA5B@lemmy.world 3 points 2 months ago

Great! The best I’ve been able to do is document a best practice to default to deleting the source branch on merge. I actually just now finished writing a script to list all repos with various details including the setting about deleting source branches on merge. I’ll talk to a few teams about it, then see if I can get management approval to set it for all repos (you can click to override in the merge request so it seems harmless)

load more comments (8 replies)
load more comments (9 replies)
load more comments (11 replies)