Re: [PATCH] rebase -i: introduce `pick -x` to add "cherry picked from commit ..."
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 6, 2026, 20:24 UTC
- Message-ID
- <xmqqcxwzamtm.fsf@gitster.g>
- In-Reply-To
- <5d238e0d-18ba-429a-a9a4-a3988b00e1e1@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 7 quoted lines
>> Usually a rebase is about rewriting the commits on a new base so that >> you can throw away the old ones. And that's why git-rebase generally >> rewrites the branch you're on, and replaces those old commits. So adding >> a "cherry-picked from..." annotation doesn't make sense there; nobody >> would have those old commits! > > Exactly
;-)
Whew. Briefly I wondered if I were the only one who felt 'rebase' and 'cherry-pick' serve two different purposes and need to behave differently, e.g., with respect to how notes on old commits are dealt with.
> On a slight tangent I've sometimes wanted to be able to do > > git cherry-pick --exec 'make test' some commits
Yes, I agree that is something quite handy.
Thanks.