Skip to content

Commit

Permalink
Merge branch 'pr/106'
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed Jun 5, 2017
2 parents 998dd0c + 51d78e4 commit 2a86ef4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,14 @@ $ git reset filename

When you want to get rid of some, but not all changes in your working copy.

First strategy, stash all good changes, reset working copy, reapply good changes.
Checkout undesired changes, keep good changes.

```sh
$ 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
Expand All @@ -308,12 +315,12 @@ $ git reset --hard
$ git stash pop
```

Alternate strategy, stash undesired changes, drop stash.
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
$ git stash drop
```

## Branches
Expand Down

0 comments on commit 2a86ef4

Please sign in to comment.