TOOL » GIT

Commit

Usage

shell
git commit OPTIONS
OptionDescription
--amendAmend the last commit.
--no-editUse the selected commit message without launching an editor.
-m --messageUse the given MSG as the commit message.

Examples

shell
git commit               # Open the editor to type the message
git commit -m 'Message'  # Create a message inline

## Update commit (not recommended if git push was done)
git commit --amend --no-edit     # Redo the last commit
git commit --amend -m 'Message'  # Redo the last commit and enter a new message