Skip to content
Snippets Groups Projects
Commit 5a6c66d3 authored by Daniel Duarte's avatar Daniel Duarte
Browse files

create resetPres

parent fe30daa3
No related branches found
No related tags found
No related merge requests found
# Practical: Git Reset
* Start by committing two files:
```bash
$ echo "This file is the one we want to keep" > header.txt
$ git add header.txt
$ git commit -m "Reset here"
$ echo "This file contains faulty code" > undo.txt
$ git add undo.txt
$ git commit -m "Undo this commit"
```
* Check the commits again and copy the relevant commit header:
```bash
$ git log
```
* Use the `reset --hard` command in order to undo the faulty commit:
```bash
$ git reset --hard <sha1>
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment