J
J
Jekson2020-12-31 12:49:02
git
Jekson, 2020-12-31 12:49:02

How to remove penultimate commit from history?

On LAN I work in two feature1 and feature2 branches, I upload the changes to the corresponding branches on the server
By mistake, I pushed feature2 into feature1 and then pushed the changes for feature1 from above.
now the log looks like

9b76f92ec3543298d26b1775609e08a8af38e291 - feature1:  improve code
325bf86eaae0c64f48aedc0e46bddd333f996208 - feature2: add new
325bf86eaae0c64f48aedc0e46bddd333f996208 - some_feature
....

Since the branches are different, there is a lot of unnecessary information about deleting and changing files in the diffs between commits, which makes it very difficult to review new functionality.
How can I remove the penultimate commit from the history so that the changes in the last commit are compared to some_feature ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-12-31
@firedragon

Search git amend

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question