Skip to content

TIL:

GIT_SEQUENCE_EDITOR="sed -i s/pick/reword/" GIT_EDITOR="sed -i '<whatever>'" git rebase -i HEAD~$N

allows to programmatically clean up commit messages using `sed -i`… or anything else that could edit a file.

Very nice for linting commits after-the-fact if somebody (like past you!) did an oopsie that could be easily machine-fixable.