Read more

Git: Changing commit messages

Tobias Kraze
December 06, 2010Software engineer at makandra GmbH

To change the commit message of the latest (unpushed, unmerged) commit, you can use
git commit --amend

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

To change the commit message of an earlier (unpushed, unmerged) commit [COMMIT], you can do
git rebase -i COMMIT~

For a current version of git, you can simply mark the line with "reword", and git will ask you later for the new message.

For older versions:

  • mark the line with edit
  • save the file
  • do a git commit --amend when rebasing stops at the relevant commit
  • git rebase --continue
Posted by Tobias Kraze to makandra dev (2010-12-06 12:24)