Home / How To

Change the message and/or files of the last commit

Using the information in your staging area to amend the last commit

git commit --amend

If no change is made to the staging area since your last commit, only the message will be updated. WARNING: use this only for local commits that have not been pushed to a remote. Amending pushed commits will cause problems for your collaborators.