Using git reset --hard HEAD^, as suggested by @konrado0905
This commit is contained in:
parent
e4fe866e14
commit
6a23217314
|
@ -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`:
|
||||
|
||||
|
|
Loading…
Reference in New Issue