Undo the middle of a git commit

The reason: the development process, after a feature done, did not have the product, and submit back many times commit, need to undo this code feature, which is the middle of the revocation of a commit

The combined company code needs to mention mr, and then rebase after the merger review, in this context, the revocation code becomes very simple

Action: submitted directly to the corresponding code: 18dc7e9c036d5ac513a8417592140b2f15cbee26

git revert 18dc7e9c036d5ac513a8417592140b2f15cbee26

[**branch* 5107db20d5] Revert "*****"
 5 files changed, 127 insertions(+), 8 deletions(-)

He pushed himself on a branch, ready to submit mr
git push --set-upstream origin ***branch**

This, revocation of work is completed

Guess you like

Origin www.cnblogs.com/jinlin/p/11697563.html