Reputation: 2397
I'm trying to apply gitflow approach in our development process, theoretically I like it. But there is one point what is not covered anywhere...
Everyone pushing their results to develop
branch. In plan, we have 10 issues which should be done and released to beta and then to production. 2 from 10 issues are not finally fixed, but partially it is already in develop branch, because developer thought he did it well, but after tests bugs are come again. And now decision we need not to wait while that 2 issues will be fixed and we need to make an upload, means make release
branch and test it on beta.
In original gitflow article says:
The key moment to branch off a new release branch from develop is when develop (almost) reflects the desired state of the new release. At least all features that are targeted for the release-to-be-built must be merged in to develop at this point in time
But what to do if in develop
branch history we can see couple not required merges ? Do I need cut them somehow ? or do anything else ?
Thanks.
Upvotes: 1
Views: 1201
Reputation: 8898
The safest thing to do in a situation like this is to use git revert to reverse the commits. This will create a commit that exactly reverses the commit in question. So git revert 1234567
will create a new commit on your branch that reverses the commit with SHA id 1234567
.
A few points about doing this:
git revert 1234567
suppose this created revert commit 09876
. Now your developer has properly implemented his feature and you want to merge it in. To get the changes removed by the revert you must now git revert 09876
and then merge his updated branch.1, 2, 3
where 1
is HEAD
do git revert 1, git revert 2, git revert 3
. Then if these reverts create commits 8, 9, 10
to reintroduce the changes revert them in order most to least recent.git help revert
Upvotes: 2