I would like to delete the log entries selected from a linear committed tree, so that the Entry Commit Log
My tree looks like something:
r - a - b - c - d - e - head
I I would like to remove the B and C entries so that they do not show the commit log, but changes in ADE should be preserved. Perhaps by starting a single commitment, so that B and C.B becomes and the tree looks like this.
R - A - BC - D - e - head
Or, ideally, comes directly after ADD. To represent change B from D, B to C and C to D.
R - A - D - e - head
Is this possible? if so, how?
This is a new project which does not have any branch now, so also there is no merger.
does the same way.
$ git rebase -i HEAD ~ 5
is an example.
- Do not use
GIT-Rebase
on public (remote) commits. - Make sure your operating directory is clean (
commit
orprint
your current changes). - Run the above order. It launches your
$ EDITOR
. Change thefirst
c
andD
tochange> squash
. It will be mixed in C and D in B. If you want to delete the commute, then just delete its line.
If you are lost, type:
$ git rebase --bort
Comments
Post a Comment