Brainstorm's snippets (1/236)

  Git partial cherry-picking

git cherry-pick -n <commit> # get your patch, but don't commit (-n = --no-commit)
git reset                   # unstage the changes from the cherry-picked commit
git add -p                  # make all your choices (add the changes you do want)
git commit                  # make the commit!

It looks like there's a new way to do this with interactively checking out:

git checkout -p bc66559

References:

https://stackoverflow.com/questions/1526044/partly-cherry-picking-a-commit-with-git#1526093

https://stackoverflow.com/questions/1526044/partly-cherry-picking-a-commit-with-git#17376789