Re: [PATCH] filter-branch: add an example how to add ACKs to a range of commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <johannes.schindelin@xxxxxx> writes:

> When you have to add certain lines like ACKs (or for that matter,
> Signed-off-by:s) to a range of commits starting with HEAD, you might
> be tempted to use 'git rebase -i -10', but that is a waste of your
> time.

Cute.

In a case like this, I tend to just do:

    git checkout $(git merge-base master js/series)

    git format-patch --stdout master..js/series | git am -s

    git diff js/series
    git branch --with js/series
    git branch -f js/series

as the first step (checking out the base, detaching HEAD) and the last
group of steps (verifying what improvements I made while on detached HEAD,
checking what _other_ branches may need to be rebuilt, and actually
updating the branch) are very common for my every-day branch whipping
workflow, and the second case being the full "format-patch | am" is just a
special case of what I do regularly, e.g. cherry-picking, manually
fixing-up, etc.

Rebase -i is very nice if you need to dig deep but the change you make is
actually very limited.  Filter-branch is too automated and requires an
enormous amount of effort to do anything flexible.  Often I find myself
wanting to do something in the middle, and I end up doing the "detach at
the base and rebuild" procedure.

Will apply.  The hint is useful nevertheless.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]