git cherry-pick -n <commitA>
Apply the changes in `<commitA>` without making a new commit.
This command applies the changes introduced by the specified commit to the current branch.
The -n
or --no-commit
option makes git apply the changes of the given commit hash to the working tree and the index, but does not make a new commit.
This is particularly useful if you need to slightly modify the changes from <commit-hash>
before committing or if you want to apply the changes from multiple commits before making a commit.
If you want to automatically create a new commit with picked changes, you can just use git cherry-pick <commit-hash>
without the -n
flag.