Amending the last commit
Changing the message or the contents of the commit you have just made, with a preview first.
Amending replaces your most recent commit with a new one. Use it for the commit you made thirty seconds ago and immediately regretted: a typo in the message, a file you meant to include, a change you meant to leave out.
The button is in the row under the commit message field, between the signing toggle and Commit. Pressing it opens a preview of what the amended commit would contain — the old message beside the new one, the files the commit already has, and the staged changes about to join them — before anything is rewritten.
What it changes
Whatever is staged when you amend joins the commit. Stage nothing and only the message changes; stage a file and it is added to what the commit already had.
The message it will use is whatever is in the field, and the field is not filled in with the old one for you. Leaving it empty is not a mistake: an empty field keeps the message the commit already has, which is what you want when the point of the amend is the files.
The signing toggle applies here as it does to a normal commit — see committing.
If you need to go further back
Amend only reaches the last commit. For anything older, or for taking a commit apart rather than adjusting it, see undo my last commit and the safety net.