revertPresentation.md 349 Bytes
Newer Older
Daniel Duarte's avatar
Daniel Duarte committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Practical: Git Revert

* On your branch, create and commit a file:
```bash
$ echo "# This commits contains errors" > revert.txt
$ git add revert.txt
$ git commit -m "Error"
```
* check the commit log and copy the `Error` commit ID:
```bash
$ git log
```
* Use the 'git revert' command to undo this selected commit:
```bash
$ git revert <sha1>
```