Languages
[Edit]
EN

Git change commit message

5 points
Created by:
Kate_C
22360

In order to change message of last commit:

git commit --amend

then git will open editor and allow us to change commit message. If we use vi / vim as editor to exit we use :wq (write and quit).

To see if we changed our commit message use git log command.

Change message of commit that we already pushed to remote repository

If we already pushed branch to remote repository then we need to use git push with force to override the changes on remote repository.

git push origin FEATURE_BRANCH -f
  • -f is shortcut from┬á--force

Git

Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join