paperlined.org
apps > git
document updated 11 years ago, on Nov 11, 2012

squash multiple versions into one

How do you squash multiple versions down into one, for instance, right before submitting it as a patch?

Three options: 1) git add --ammend, 2) rebase, and 3) git merge --squash.

cherry-picking

[1]

splitting one commit into several

rebase -i

add --patch

fugitive.vim is awesome for this

reorder commits

rebase -i

wisdom

Good advice: "you should not rewrite history for things that are already push out into the world"