> For the complete documentation index, see [llms.txt](https://raviram.gitbook.io/version-control/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raviram.gitbook.io/version-control/basic-operations/undo-changes/amend-rare.md).

# Amend (rare)

### Amend

One of the common undos takes place when you commit too early and possibly forget to add some files, or you mess up your commit message.&#x20;

If you want to redo that commit, make the additional changes you forgot, stage them, and **commit again** using the `--amend` option:

```
git commit --amend
```

{% hint style="info" %}
Effectively, it’s as if the previous commit never happened, and it won’t show up in your repository history either!
{% endhint %}

{% hint style="danger" %}
We need to use `Esc + : + "wq" (enter)` to exit the message amend screen!
{% endhint %}
