1
0
mirror of https://github.com/k88hudson/git-flight-rules.git synced 2025-03-10 20:58:39 -03:00

Adding stashes back in

This commit is contained in:
Richard Littauer 2017-06-05 12:08:56 +01:00
parent 542884da13
commit 51d78e43c5

View File

@ -306,6 +306,23 @@ $ git checkout -p
# Answer y to all of the snippets you want to drop # Answer y to all of the snippets you want to drop
``` ```
Another strategy involves using `stash`. Stash all the good changes, reset working copy, and reapply good changes.
```sh
$ git stash -p
# Select all of the snippets you want to save
$ git reset --hard
$ git stash pop
```
Alternatively, stash your undesired changes, and then drop stash.
```sh
$ git stash -p
# Select all of the snippets you don't want to save
$ git stash drop
```
## Branches ## Branches
<a name="pull-wrong-branch"></a> <a name="pull-wrong-branch"></a>