diff --git a/README.md b/README.md index 2e496137..b587f1e7 100644 --- a/README.md +++ b/README.md @@ -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