Re: "git reset --hard" on riscv for-linux-next branch
From: Stephen Rothwell
Date: Mon Nov 27 2017 - 17:27:37 EST
Hi Palmer,
[Sorry for the slow reply]
On Wed, 22 Nov 2017 11:01:57 -0800 (PST) Palmer Dabbelt <palmer@xxxxxxxxxx> wrote:
>
> Is it OK to rewrite history on my for-linux-next branch? Since we got upstream
> I've started getting patches from various people and as a result I now have a
> bunch of branches with independent commits on them. In an ideal world I'd like to
> do something like
>
> git checkout for-linux-next
> git reset --hard torvalds/master # or maybe the latest tag?
Resetting to a tag is preferred. Though once you choose a tag (-rc1 or
-rc2 maybe) its nice to stick to it. If some commits are based on
later places in Linus' tree, they will bring the necessary commits with
them.
> for branch in $(list-staging-branches-for-linux-next)
> do
> git merge $branch
> done
> git push --force palmer for-linux-next
>
> Is that an OK thing to do regularly in the branch I give to you? I can find a
> bunch of information on how to use linux-next, but not for people in it.
Seems fine, a few other linux-next included branches are managed just
like that. Alternatively, if the branches you are merging never rebase
(and they really shouldn't in most cases), you could just remerge the
ones that change every now and then (rather than stating from
scratch). This may mean that you need to tidy up your tree a week or
so before sending it to Linus, but it will give your developers
something a bit more stable to work with.
Either works for me.
--
Cheers,
Stephen Rothwell