본문 바로가기

Development/Git

[git] Change the commit message

The following commands are used to change the commit message that's already pushed.

 

  1. git commit --amend -m "message"
  2. git push -f

 

You need to check if the branch is a protected branch in gitlab.

It will not work if it's a protected branch.