How can I “undo” merging functions in Git?

I'm relatively new to Git, and I want to know if this is the right thing to do, and are there other ways to remove a function branch that is merged with the main branch. Let me explain with an example:

Suppose we are working on three tickets (bugs / improvements), and there are three branches of functions, one for each ticket, each of which is branched with the v2.0.21 tag. After the development work is carried out on each ticket, and after sufficient testing we will combine it with the leading branch and mark this branch, as v2.0.22 says, and release it for production.

Immediately after the release of production, let’s say, we found out that one of the tickets (Ticket2) fails and must be deleted. This is what I had in mind, and I wanted to know if this is a good approach to remove Ticket2-related commits.

Let's say

  • Create a new branch from v2.0.21
  • Merge Ticket1 (Branch1) and Ticket3 (Branch3) in this new branch
  • Force a new branch to control.
  • Tag Wizard as V2.0.23
  • Release code from version 2.0.23 to release.

I hope someone can help me approve this approach and suggest more efficient ways to remove a branch of a function that is already merged with the wizard. Thank!

+5
source share
1 answer

" ", , , git revert .

Git , , .

+5

All Articles