blog/content/chs-git.md
2019-04-22 20:45:19 +05:30

20 lines
448 B
Markdown

---
Title: Some git tricks
Date: 2019-04-22 17:00
Author: Fabrice
Category: cheat sheets
Slug: git-tricks
Header_Cover: images/cover_water.jpg
---
Some [git](https://git-scm.com/) tricks I use from time to time and that I forgot everytime…
Reset `master` to `origin/master`:
```sh
git co origin/master -B master
```
Another useful trick is `git commit -v`, it allows reviewing your changes before committing.
![Example](/examples/git-cv.svg)