We have a few branches…
masteris our dev branch.feature-newfeatureis a new feature.feature-tempfeatureis a new feature that our product team have asked for until new feature is created.feature-newfeaturewas started a while ago and hasn’t been merged intomasteryet (but there have been other changes tomaster).
We have now been instructed to put this temp feature in which needs all the changes from master – so its a releasable build – but also needs some of the stuff we’ve been working on in newfeature (as they say “you can reuse some of the stuff you’ve already done”).
How would it be best to go about doing this? I have created feature-tempfeature from the master branch. feature-newfeature isn’t finished, and I don’t want to merge it into master.
I don’t want to just use feature-newfeature either because we want to be able to keep working on that in parallel.
How would you sort out this issue in your dev environment?
Many thanks!
branches are just aliases for a specific commit. Therefore you can have multiple branches that actually point to the same commit. So, what you could do is to create a new branch
newBranchthat points to the same commit as master and then mergefeature-tempfeatureintonewBranch. The effect would be the same as merging into master, except that master stays untouched.