mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Added explanation for reseting a single file
This commit is contained in:
parent
4622e309f1
commit
eb73619120
@ -477,8 +477,7 @@ One way of reseting to match origin (to have the same as what is on the remote)
|
||||
(master)$ git reset --hard origin/bug24
|
||||
```
|
||||
|
||||
|
||||
<a href="discard-local-uncommited-changes"></a>
|
||||
<a href="i-want-to-discard-my-local-uncommitted-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:
|
||||
@ -494,6 +493,12 @@ If you want to only reset to some commit between origin and your local, you can
|
||||
(master)$ git checkout -f
|
||||
```
|
||||
|
||||
To reset only a specific file, you can use that the filename as the argument:
|
||||
|
||||
```sh
|
||||
$ git reset filename
|
||||
```
|
||||
|
||||
<a href="undo-git-reset-hard"></a>
|
||||
## I accidentally did a hard reset, and I want my changes back
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user