Rebase can clean local commit history
Interactive rebase lets you inspect a sequence of commits and reorder, edit, squash, reword or drop them. It is useful for turning a messy local sequence into a coherent series before review.
Common actions
pick keeps a commit, reword changes its message, edit pauses for changes, squash combines commits while allowing message editing, and drop removes a commit from the rewritten sequence.
Rebase rewrites commit IDs
Because parent relationships change, rebased commits receive new hashes. Use interactive rebase primarily on commits that are not already depended on by other developers.