You can programmatically edit only the last commit message:
git commit --amend -m 'xxxxxxx'
Or a random commit interactively:
git rebase -i HEAD~n# Vim opens up, select the commit you want to modify, and change the word "pick" for "edit"git commit --amend -m "Changing an old commit message!"git rebase --continue
How do I combine both? I want to change a message programmatically, but to a prior commit, not just the last one.
The commit I want to modify has already been pushed to a git server, but having other people re-sync the git project is not a concern.