Branch develop22 finished a three monts ago(was created from master). After that developers worked with branch master. But 20 days ago develop22 pushed into master(but before master wasn't pushed into develop22). After that developers do not suspect about this issue still worked more than 10 days.
I need to remove this merge commit, but save subsequent commits.
I know we can use revert this commit and after use cherry-pick for each subsequent commit, but this is really long way.
Anyone can help with much optimistic way?
Hi Denis,
Welcome to the Atlassian Community.
I have done these reverts in the past, they are not fun to do but can be done. Here are the steps I use:
You can now merge this new branch into the target and be sure that your reverted changes once again will be included.
Here is Linus Torvalds explanation of the situation and why you need a new branch:
Reverting a regular commit just effectively undoes what that commit did, and is fairly straightforward. But reverting a merge commit also undoes the _data_ that the commit changed, but it does absolutely nothing to the effects on _history_ that the merge had.
So the merge will still exist, and it will still be seen as joining the two branches together, and future merges will see that merge as the last shared state - and the revert that reverted the merge brought in will not affect that at all.
So a "revert" undoes the data changes, but it's very much _not_ an "undo" in the sense that it doesn't undo the effects of a commit on the repository history.
So if you think of "revert" as "undo", then you're going to always miss this part of reverts. Yes, it undoes the data, but no, it doesn't undo history.
what i have to do use that:
just to find parent commit? :)
i can use another soft like gitk or gitkraken
thank you very much:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.