18 lines
383 B
Markdown
18 lines
383 B
Markdown
---
|
|
title: Some git tricks
|
|
date: 2019-04-22
|
|
category: Cheat Sheets
|
|
header_cover: images/cover_git.jpg
|
|
---
|
|
|
|
Some git 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)
|