add the old snippet md files
This commit is contained in:
parent
fc0dd204c7
commit
bcf8313a4b
110 changed files with 3048 additions and 0 deletions
16
old_snippets/git-revert.en.md
Normal file
16
old_snippets/git-revert.en.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue