How do you git cherry-pick --continue with --no-verify since --no-verify is not a valid option. git cherry-pick --no-commit --continue does not work since those two parameters are mutually exclusive.
If you look at the console, "fix conflicts and run "git cherry-pick --continue." When fixing conflicts the normal way (without the cherry-pick), the console will mention to commit (after the conflicts have been fixed).
In your case you can simply checkout master branch and then cherry-pick all the commits from any branch that you wish ( cherry-pick supports ranges so you can specify start and end commit instead of listing all the commits). This way you can control the way your commits will appear in the desired branch.
If your cherry-pick (without --no-commit) had merge conflicts and you want to --continue after solving them, you can temporarily disable git hooks for the current repo with:
$ git config core.hooksPath # Print current setting
$ git config core.hooksPath '/dev/null/'
After you're done, depending on whether core.hooksPath was set before, you can either restore the previous setting:
$ git config core.hooksPath '/some/previous/path'
or unset it again:
$ git config --unset core.hooksPath
--no-verify is an option for the commit command, not cherry-pick.
However what you can do is to use the --no-commit flag for your cherry-pick, then git commit --no-verify is fine to conclude the cherry-pick.
To expand on @mickdekkers answer, I added the following function to my ~/.bashrc --
git() {
if [[ $@ == *"--no-verify"* ]];
then
command git -c core.hooksPath=/dev/null "$@ | sed 's/--no-verify//'";
else
command git "$@";
fi;
}
This sets the hookpath to null any time the --no-verify flag is used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With