Cherry-pick git commit into current branch by "patch" command
Applies a commit to the current branch using patch instead of cherry-pick.
/plugin marketplace add openshift-eng/ai-helpers/plugin install git@ai-helpers<commit_hash>git:cherry-pick-by-patch
/git:cherry-pick-by-patch commit_hash
The /git-cherry-pick-by-patch commit_hash command cherry-picks commit with hash
commit_hash into current branch. Rather then doing git cherry-pick commit_hash,
the command streams the output of git show commit_hash to
patch -p1 --no-backup-if-mismatch, and then commit changes with commit message
from commit_hash commit.
The commit with hash commit_hash must exist. To verify that use:
git show commit_hash
and check if exit code is zero.
Fail, if there is no commit_hash in the current repository checkout.
commit_hash into current branchgit show commit_hash | patch -p1 --no-backup-if-mismatch
and check if exit code is zero. Fail if exit code is not zero.
Find files removed from local checkout by the patch command and execute git rm for them.
Find files added or modified by the patch command and execute git add for them.
Commit changes by git commit command and use commit title and description from commit_hash commit.
902409c0) of commit to cherry-pick.