From 6a23217314d2f7adccfe121aee501af7b17fd202 Mon Sep 17 00:00:00 2001 From: Arialdo Martini Date: Tue, 19 May 2015 14:09:55 +0700 Subject: [PATCH] Using git reset --hard HEAD^, as suggested by @konrado0905 --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 790f498..69933f4 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,11 @@ Create the new branch while remaining on master: ``` Find out what the commit hash you want to set your master branch to (`git log` should do the trick). Then reset to that hash. `git push` will make sure that this change is reflected on your remote. +Reset the branch master to the previous commit: + +```sh +(master)$ git reset --hard HEAD^ +``` For example, if the hash of the commit that your master branch is supposed to be at is `a13b85e`: