Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Att doc em "Primeiros Passos com Git e GitHub" #72

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions materiais-de-apoio/03-primeiros-passos-com-git-e-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,24 @@ $ git commit --amend –m"nova mensagem"
```

#### Como desfazer um commit
O Git oferece várias maneiras de desfazer um commit, dependendo de como você quer manipular o histórico.

- Reseta o último commit mantendo as mudanças na área de preparação:

```bash
$ git reset
```
```bash
$ git reset --soft
$ git reset --soft <hash_do_commit>
```

- Reseta o último commit e move as mudanças para a área de trabalho:

```bash
$ git reset --mixed
$ git reset --mixed <hash_do_commit>
```

- Remove completamente o commit e as mudanças associadas:

```bash
$ git reset --hard
$ git reset --hard <hash_do_commit>
```

##
Expand Down