I would like to remove selected commit log entries from a linear commit tree, so that the entries do not show in the commit log.
My commit tree looks something like:
R--A--B--C--D--E--HEAD
I would like to remove the B and C entries so that they do not show in the commit log, but changes from A to D should be preserved. Maybe by introducing a single commit, so that B and C become BC and the tree looks like.
R--A--BC--D--E--HEAD
Or, ideally, after A comes D directly. D' representing changes from A to B, B to C and C to D.
R--A--D'--E--HEAD
Is this possible? if yes, how?
This is a fairly new project so has no branches as of now, hence no merges as well.
Here is a way to remove a specific commit id knowing only the commit id you would like to remove.
Note that this actually removes the change that was introduced by the commit.
One more way,
pick the hash that you want to use it as a base, and the above command should make it interactive so you can squash all the top messages ( you need to leave the oldest )