mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
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.
|
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`:
|
For example, if the hash of the commit that your master branch is supposed to be at is `a13b85e`:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user