mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 20:58:39 -03:00
Merged two answers
This commit is contained in:
parent
875c49d0d1
commit
cdef6a1274
11
README.md
11
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
|
(master)$ git reset --hard origin/bug24
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<a href="discard-local-uncommited-changes"></a>
|
||||||
|
## 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:
|
If you want to only reset to some commit between origin and your local, you can do this:
|
||||||
|
|
||||||
```sh
|
```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^^
|
(bug24)$ git reset --hard HEAD^^
|
||||||
# four commits
|
# four commits
|
||||||
(bug24)$ git reset --hard HEAD~4
|
(bug24)$ git reset --hard HEAD~4
|
||||||
```
|
|
||||||
|
|
||||||
<a href="discard-local-uncommited-changes"></a>
|
|
||||||
## I want to discard my local, uncommitted changes
|
|
||||||
|
|
||||||
```sh
|
|
||||||
(master)$ git reset --hard
|
|
||||||
# or
|
# or
|
||||||
(master)$ git checkout -f
|
(master)$ git checkout -f
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user