support Branching and Opinions
I've read a few different posts in git in relating to branches and opinions, and I'm struggling to find a way for it to work for the business I work in.
We've recently moved from TFVC to Git and we're more problems than I thought we would have.
We're a quick development team - we easily develop and resolve over 50-70 tickets per month as a Development team, with releases every month too.
However not everything gets released - it does vary, incase there is anything that fails testing (or not tested on time) and things like that, that we wanted to avoid.
TFVC we didn't really run the way Git runs - we never created branches for everything - it was all or nothing went out, so we found moving to Git being a MAJOR benefit that we would branch everything - however we've noticed it is spiraling out of control and I'm hoping someone could give me an insight on if we're doing it right, and if not - the best route to do it.
We originally had a main, a branch from that for 'Regression', and then a further branch from Regression for 'Development'. Us, being unaware, were completely checking into Development at the time and we were losing code and it was a total mess.
After having a think about it, we removed 'Regression' and 'Development' entirely, so it brought the question "How do we check each others work, to ensure we're working on the appropriate things, as well as bring all those branches together into one Branch for testing purposes before regression?"
To put into perspective, we're near the end of the month, and we're sitting with about 40 tickets waiting to be tested by various users throughout the organisation. So doing builds for each one is a nightmare as we only have one web platform that would share those changes.
So I developed something that would bring all those branches together (that have pull requests to main) for testing and label them accordingly.
However, that is causing a real mess with conflicts and things like that, especially trying to fix conflicts and just generally breaking everything.
Now we've hit our next hurdle - we originally were keeping main as production, however our CEO has decided to put code into Main and say that we should be branching for Releases that we're building to apply hotfixes and increasing revisions. Now, I think that is all well and good, but having to branch from the release to apply a hotfix, to then re-merge back into main when that inevitably will go out at the end of the month just seems extra work for something that we should've kept as production ready in the first place.
Is there something I am missing from Git or functionality to get this to work?
- Main was originally production, but code has been added that "must go out, but not to customers... yet.."
- We're meant to branch from Releases to apply hot fixes and create a new release and then merge into Main as another branch entirely. Is this right?
- How do we bring all these changes together into a simple test/regression release? Bringing all changes together for every build we do (which could be several a day) would be extremely time consuming. Our CEO wants to see what everyone worked on at a glance to ensure he is not overwriting any of our code that we write.
I've been working with the likes of ChatGPT, Claude and the rest to work out how others do it and it's adament I am doing it correctly, but I honestly feel like I'm missing something.
We've not built any workflows in Git and that could be the reason.