Using git reset --hard HEAD^, as suggested by @konrado0905

This commit is contained in:
Arialdo Martini 2015-05-19 14:09:55 +07:00 committed by Richard Littauer
parent e4fe866e14
commit 6a23217314
1 changed files with 5 additions and 0 deletions

View File

@ -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`: