Skip to content

Commit

Permalink
git-reset: add simpler --hard example
Browse files Browse the repository at this point in the history
  • Loading branch information
waldyrious authored and sbrl committed May 18, 2017
1 parent 05780d6 commit 595c4eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/common/git-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

`git reset --soft HEAD~2`

- Discard any uncommitted changes, staged or not (for only unstaged changes, use `git checkout`):

`git reset --hard`

- Reset the repository to a given commit, discarding committed, staged and uncommitted changes since then:

`git reset --hard {{commit}}`

0 comments on commit 595c4eb

Please sign in to comment.