Yes, we can edit commit message,
and specify that the current commit shall “amend” the previous commit in the current branch.
The new commit will then replace the previous one. This feature is often used to correct incorrect commits before they are published to other repositories.
Note: do not amend commits if they have already been published to a shared repository since this may disturb others if they already based their changes on the published change.
You may be also interested in