I make a fix in one branch and want to apply it to another branch. Here's what I have been doing:
git diff 68610d^ 68610d | git apply
git commit -a -m "SV-656 IP blocking not working (applying patch from 68610d)"
works perfectly but it occurs to me, it doesn't seem like a very git-like way to do things. In particular, what I am actually doing is only apparent from the comment. This is a very basic activity and I don't think git would have missed it.
EDIT: is this the function of "cherry-pick"?
The correct way would be
git cherry-pick 68610d
If your really wanted to alter the commit message:
git cherry-pick --no-commit 68610d
git commit -m "SV-656 IP blocking not working (applying patch from 68610d)"
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