Reputation: 93
I have a code public repository with the following structure, new features are implemented by breaking off a new branch from master and merging it back.
(bugfix) | U / (master) / | A--B--C--D--E...J--K | (production)
Lets say there is a bug in the commit which production is pointing to (B).
(master) | A---B---C'---D'---E' ... J'---K' | (production)
(bugfix) (master) | | A---B---U---C---D---E ... J---K | (production)
if so how do i have the changes applied to C, D, E ..
(bugfix) (master) | | A---B---U---C'---D'---E' ... J'---K' | (production)
Edits
Upvotes: 0
Views: 91
Reputation: 935
I highly recommend to use online git playground to emulate your process, those emulators include: https://git-school.github.io/visualizing-git/#free (disclaimer: I'm not the developer of this site)
Firstly, I think those things could only happened with bad branch management.
If you don't want K
to be in production yet, why would you merge/commit K
into the master
branch.
To deal with this issue, you can
dev
) just like current master
branchB
U
onto master
branchmaster
into your dev
branch. (bugfix, master)
|
A---B---U
|
(production)
(possible merge request commit, dev)
|
A---B---C---D---E ... J---K---L
|
(production)
Upvotes: 2