From cdef6a1274aa46d666a4197d245be5e96171d761 Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Fri, 3 Jul 2015 16:20:02 -0400 Subject: [PATCH] Merged two answers --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f78f08a..eb550de 100644 --- a/README.md +++ b/README.md @@ -457,6 +457,10 @@ One way of reseting to match origin (to have the same as what is on the remote) (master)$ git reset --hard origin/bug24 ``` + + +## I want to discard my local, uncommitted changes + If you want to only reset to some commit between origin and your local, you can do this: ```sh @@ -466,13 +470,6 @@ If you want to only reset to some commit between origin and your local, you can (bug24)$ git reset --hard HEAD^^ # four commits (bug24)$ git reset --hard HEAD~4 -``` - - -## I want to discard my local, uncommitted changes - -```sh -(master)$ git reset --hard # or (master)$ git checkout -f ```