Timeline for What is the difference between trunk based development and gitflow?
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 17, 2023 at 13:50 | history | edited | bdsl | CC BY-SA 4.0 |
Add missing TBD marker
|
| Dec 19, 2022 at 16:02 | comment | added | bdsl | The role of master in GF is more like the role of the series of release branches in TBD with release branches. | |
| Dec 19, 2022 at 16:01 | comment | added | Ewan | GF doesnt specify how long you take to make your feature or release, it just gives you a way to manage it when they take long enough that you have concurrent ones in progress | |
| Dec 19, 2022 at 16:00 | comment | added | Ewan | master and trunk are both the root level. its just different names | |
| Dec 19, 2022 at 15:59 | comment | added | Ewan | "....Of course they do happen sometimes with teams that are trying to follow TBD - people don't follow methods perfectly." | |
| Dec 19, 2022 at 15:59 | comment | added | bdsl | @Ewan I think "develop" in GF is actually closer to "trunk" in TBD. These are the branches that feature branches are made from and merged to. | |
| Dec 19, 2022 at 15:58 | comment | added | bdsl | @Ewan No, the biggest difference is the time interval. | |
| Dec 19, 2022 at 15:57 | comment | added | Ewan | so im reading through you differences and given "master" == "trunk" the only one I see is that GF has a "dev" branch. everything else you include a "but" or "unless" | |
| Dec 19, 2022 at 14:11 | comment | added | bdsl | I don't know what sort of application you work on, but for anything like a web app, where there is just one production environment and it's controlled by the people who write the code, I would generally avoid having release branches in TBD, and deploy code from trunk instead, doing continuous delivery. Each commit on trunk is sent through a series of automated quality and correctness checks, and then deployed to prod if all checks pass. | |
| Dec 19, 2022 at 14:06 | comment | added | bdsl | It's often not at all true that you can just as easily forget either way. Not only is the current release that's in prod just more salient mentally, you may well have automatic monitoring systems, and (on larger systems) frequent user complaints reminding you to fix the issue in prod, which if you're using release branches means in the current release. | |
| Dec 19, 2022 at 14:02 | comment | added | bdsl | OK. trunkbaseddevelopment.com/branch-for-release explicitly says "Cherry-picks from the trunk to branch ONLY" | |
| Dec 19, 2022 at 13:59 | comment | added | Greg Burghardt | If you need to remember to cherry pick, you could just as easily forget to cherry pick. I would recommend against having anything in a release branch that isn't in the main branch. If the fix was discovered in release X, fix it in release X. Merge to the main branch (which will become release X+1). I wouldn't fix a bug introduced in release X in your main branch, because that is release X+1. People can get too focused on "always base branches on trunk". You need to be pragmatic about that. | |
| Dec 19, 2022 at 13:58 | comment | added | bdsl | In the UK, ATMs used to cash first and then return the bank card. But there was a problem that sometimes people walked away and forgot to take their cards. Banks switched the order so people had to take their cards before the machine would give money, and they didn't forget to take either. I think fixing on trunk before fixing on the release branch is like that. If someone is complaining about a break in prod you're unlikely to forget to fix it there, but you might forget to fix in the main branch if you don't do that first. | |
| Dec 19, 2022 at 13:52 | comment | added | bdsl | For context, I personally advocate for TBD to be used a lot more than it is, and for GF to be generally avoided. | |
| Dec 19, 2022 at 13:50 | comment | added | bdsl | Why would a merge conflict be more likely one way or the other? Either the main branch and the release have diverged enough to cause a conflict with your fix, or they haven't. Release branches are generally never merged to main branch in TBD - and hotfixing on release first opens the possibility of forgetting to merge to main, which means the bug will be fixed in release x and then appear again in release x+1. | |
| Dec 19, 2022 at 13:48 | comment | added | Greg Burghardt | "Hotfix branch created from: [...] TBD: Trunk, with a cherry-pick to release if required." --- I can see cherry picking between feature branches. Base your hotfix on the release, and then merge to the main branch. Cherry picking between your main branch and a release branch just invites merge conflicts. | |
| Dec 19, 2022 at 13:44 | history | answered | bdsl | CC BY-SA 4.0 |