Git: Changing a commit message


For the latest commit:
  1. git commit --amend
  2. In text editor, edit the commit message, and save the commit.
  3. git push --force

For old commits:
  1. git rebase -i (previous commit which you want to change message)
  2. On top of text edtior, change pick to reword
  3. Change a new message commit
  4. git push --force

Comments

Popular posts from this blog

Logout Git on MacOS

Login/Logout account Git in Terminal/cmd

React Tutorial for Beginners