Skip to content

Commit

Permalink
Adding stashes back in
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed Jun 5, 2017
1 parent 542884d commit 51d78e4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,23 @@ $ git checkout -p
# 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

<a name="pull-wrong-branch"></a>
Expand Down

0 comments on commit 51d78e4

Please sign in to comment.