I'm working specifically within the confines of git-flow here. It's very clear to me how this would be accomplished with git generally, but git-flow is the thing I'm primarily concerned with here.
Imagine this scenario:
- developer 1 and developer 2 are both working in parallel.
- developer 1 and developer 2 each have many small issues.
- developer 1 finishes his first branch, we'll call it
feature/A
.feature/A
is quickly approved and merged todevelop
- developer 2 finishes his first issue, we'll call it
feature/b
.feature/B
is quickly approved and merged todevelop
- developer 2 now must start
feature/C
. So he checks out develop, and doesgit pull upstream develop
thengit checkout -b feature/C
- developer 2 finishes
feature/C
.feature/C
is quickly approved and merged todevelop
But wait! There's a problem. We've discovered a bug from feature/A
and the release is tomorrow! We need to release B and C but not A. How do I do that? All to the commits from feature/A
are contained in feature/C
.