I did a lot of searches on this, I apologise if this is a dupe, I couldn't find any answers that directly addressed my issue.
We have a client who will mull over a feature for a while and while doing this will quickly approve another feature.
This means that we make feature branches from master and merge them in to deploy to a QA environment, this is all well and good, but when feature2 is approved before feature1 we need to then merge feature2 into our releases branch without any trace of feature1.
This sounds ok, but this has been going on for a while and there is a constantly different commit history between master and releases.
What we've tried;
- Branch feature2 from master and merge feature2 branch into releases - this results in too much unwanted commit history coming with it.
- Merge master into releases. See problem 1. Too much history.
- Create the feature branch from releases, not master. Good in theory, but far too many conflicts on a regular basis to make it a good option.
- Cherry picking. Ergh. This is the only thing we've been able to do and its contributed to our diverged branches.
Does anybody have a suggested workflow for this?
I thought we could branch from master at the point of the releases branch but then I think we'd have the same problems as 2 above.
EDIT
See link two below (What kind of Git workflow suits our case?) - Possibly a 'temporary' branch could work for deployment to the dev environment?
Some similar discussions ;
What git branching models actually work?
What kind of Git workflow suits our case?