16 lines
624 B
Markdown
16 lines
624 B
Markdown
---
|
|
title: "oops i take that back"
|
|
date: 2020-01-11T04:57:24+01:00
|
|
draft: false
|
|
snippet_types: ["git"]
|
|
---
|
|
|
|
```shell
|
|
$ git revert sfjes_examplehash_f32f32h
|
|
```
|
|
|
|
Some times you only need to undo a spific commit, often when you have already pushed to orgin and can't rebase past a certin point that's where **git revert** comes in. Simply supply it with a commit hash and it will basiclly undo that commits changes. This can be combined with git rebase if you need to git revert servral commits then rebase all the reverts into a single revert.
|
|
|
|
source:
|
|
|
|
[git docs](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History)
|