On Mon, Jul 20, 2026 at 11:25:17AM +0200, Andreas Enge wrote:
> On Mon, Jul 20, 2026 at 11:11:50AM +0200, Cayetano Santos wrote:
> > Otherwise, you can create a new worktree, build the whole thing again,
> > but just once. This is helpful for more permanent topic branches.
> 
> I also do this for team branches.
> 
> For pull requests, there is a "git script" due to Ludovic, which is
> particularly useful for committers. You can add the following two lines
> into .git/config:
> [alias]
>         mp="!m() { for id in $(git cherry HEAD pulls/pr/$1 | cut -c2-); do 
> git cherry-pick --signoff $id; done; }; m"
> 
> Like Cayetano's suggestion, this assumes that you have also added
> a new remote
> [remote "pulls"]
>         url = [email protected]:guix/guix.git
>         fetch = +refs/pull/*/head:refs/remotes/pulls/pr/*
> and do a "git fetch pulls" from time to time.

you can also add more fetch lines to existing remotes

[remote "origin"]
        url = https://codeberg.org/guix/guix
        fetch = +refs/heads/*:refs/remotes/origin/*
        fetch = +refs/pull/*/head:refs/remotes/origin/pr/*


> 
> Then
>    git mp 9999
> puts the pull request 9999 on top of your branch and even signs
> it off.
> 
> When I already see small changes to be made to the commit message, say,
> I often cherry-pick the commits one by one instead.
> 
> Andreas
> 

-- 
Efraim Flashner   <[email protected]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature

Reply via email to