% git-amend(1) Version 0.1.5 | git-amend
git-amend
DESCRIPTION
This commands allows you to recreate the last commit
- with the actual modified and added files.
- with a new message
- or both
It's a git commit amend that always work (even if the commit was pushed to the remote)
HOW?
- Soft reset of the last commit. ie:
- Delete the commit (locally and remotely)
- Put the files of the deleted commit in the index
- Recreate a commit with all files
- If the last commit was tagged
- Delete the tag
- Delete the GitHub release
SYNOPSIS
Recreate the last commit with the actual modified and added files.
git-amend [-e|--edit] [-nr|--no-recurse] [Commit Message]
If the commit message is not given, it will take the message of the last commit.
--editor-e: edit the message in the editor--recurseor-r: recurse and amend in the submodules
SUBMODULES
By default, this command does not recurse on submodules
See also
- git commit amend official documentation
- git absorb plugin command that tries do the same job