> For the complete documentation index, see [llms.txt](https://cumbucadev.gitbook.io/github-essentials/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cumbucadev.gitbook.io/github-essentials/dia-4/sua-vez/exercicio-6.md).

# Exercício 6

## Alterando o último commit

Neste exercício, você vai simular uma situação comum: você fez um commit, mas logo percebeu que esqueceu de adicionar uma mudança importante ao arquivo antes de confirmar. Em vez de fazer um novo commit separado, você irá usar o `git commit --amend` para corrigir o anterior.

### ✅ Tarefa

Adicione um novo título ao arquivo `lidos.txt`, faça um commit com essa alteração e, em seguida, edite esse último commit para incluir mais uma alteração usando o comando `git commit --amend`.

***

#### 💡Dica&#x20;

1. Faça uma alteração simples no projeto.
2. Verifique o histórico de commits para garantir que você está alterando o último.
3. Use `git status` e `git diff` para acompanhar o que está sendo alterado.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cumbucadev.gitbook.io/github-essentials/dia-4/sua-vez/exercicio-6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
