Undo / redo a series of commits
suggest changeTo drop some of the last dozen commits and keep the rest:
git rebase -i <earlier SHA>
-i is interactive mode. Before replaying commits, Git opens the todo list in your editor:
Delete a line to drop that commit. The first line of the todo list cannot be squash or fixup. Use squash or fixup on a later line to combine that commit into the one above it:
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents