I would like to be able to select which changes to include in the cherry-pick
at a patch-level much like the -p
option when adding changes to commit?
Asked
Active
Viewed 84 times
0

SwissCodeMen
- 4,222
- 8
- 24
- 34

feeling_lonely
- 6,665
- 4
- 27
- 53
-
You could use the `--no-commit` option and then discard what you don't want. – evolutionxbox Apr 25 '22 at 15:44
-
1Yes. First you `git cherry-pick -n
`, then you can `git reset -p` and select every chunk you want to unstage before finally committing. – Romain Valeri Apr 25 '22 at 15:51
1 Answers
0
You could use git show instead of git cherry-pick command:
git show <commit_id> -- <file_path> | git apply
Then, commit your changes.

Houssem Ben Ali
- 11
- 1