* rxe MW PR for rdma-core
@ 2021-06-25 4:59 Bob Pearson
2021-06-25 14:39 ` Jason Gunthorpe
0 siblings, 1 reply; 4+ messages in thread
From: Bob Pearson @ 2021-06-25 4:59 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky, linux-rdma@vger.kernel.org
It took a few hours but I finally managed to get rid of the merge commits in the rxe MW PR. It's back out there at github. I lost the name change Jason had made when I deleted and reforked my repo. I remade the update kernel headers commit without the ??. It still passes all the screening tests.
Regards,
Bob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rxe MW PR for rdma-core
2021-06-25 4:59 rxe MW PR for rdma-core Bob Pearson
@ 2021-06-25 14:39 ` Jason Gunthorpe
2021-06-25 15:04 ` Bob Pearson
0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2021-06-25 14:39 UTC (permalink / raw)
To: Bob Pearson; +Cc: Leon Romanovsky, linux-rdma@vger.kernel.org
On Thu, Jun 24, 2021 at 11:59:14PM -0500, Bob Pearson wrote:
> It took a few hours but I finally managed to get rid of the merge
> commits in the rxe MW PR. It's back out there at github. I lost the
> name change Jason had made when I deleted and reforked my repo. I
> remade the update kernel headers commit without the ??. It still
> passes all the screening tests.
You should never have to delete and refork with git.
Force push fixes all mistakes.
The sequence to fix your situation is
1) Starting at the bad branch merge to latest rdma-core
2) Create a new branch on latest rdma-core
3) Use 'git cherry-pick' on each non-merge commit from the
bad branch
4) Diff the bad/good branch to make sure nothing got missed in the
merges
5) Reset the bad branch to the new branch's commit ID.
6) Force push the fixed branch to github.
In future use 'git rebase' instead of 'git merge'
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rxe MW PR for rdma-core
2021-06-25 14:39 ` Jason Gunthorpe
@ 2021-06-25 15:04 ` Bob Pearson
2021-06-25 16:20 ` Jason Gunthorpe
0 siblings, 1 reply; 4+ messages in thread
From: Bob Pearson @ 2021-06-25 15:04 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: Leon Romanovsky, linux-rdma@vger.kernel.org
On 6/25/21 9:39 AM, Jason Gunthorpe wrote:
> On Thu, Jun 24, 2021 at 11:59:14PM -0500, Bob Pearson wrote:
>
>> It took a few hours but I finally managed to get rid of the merge
>> commits in the rxe MW PR. It's back out there at github. I lost the
>> name change Jason had made when I deleted and reforked my repo. I
>> remade the update kernel headers commit without the ??. It still
>> passes all the screening tests.
>
> You should never have to delete and refork with git.
>
> Force push fixes all mistakes.
>
> The sequence to fix your situation is
>
> 1) Starting at the bad branch merge to latest rdma-core
> 2) Create a new branch on latest rdma-core
> 3) Use 'git cherry-pick' on each non-merge commit from the
> bad branch
> 4) Diff the bad/good branch to make sure nothing got missed in the
> merges
> 5) Reset the bad branch to the new branch's commit ID.
> 6) Force push the fixed branch to github.
>
> In future use 'git rebase' instead of 'git merge'
>
> Jason
>
I have a question about how the various trees are arranged.
I started by cloning the rdma-core tree from github to my local machine (i.e. origin master).
Then later I added my own github account and forked the rdma-core tree.
I have a link to is in my local .git/config (i.e. my-rdma-core).
Normally I do a git pull from origin which is shorthand for git fetch + git merge (I think??)
To rebase instead do you have to first do a fetch then a rebase or can you set the rebase flag in
.git/config?
I also do updates in the github web site from rdma-core to my copy there. I was having a hard time
getting the private github tree and the local tree to match (because of merge commits)
In the github docs that I read last evening they seem to recommend cloning the forked github tree
instead of the upstream tree on your local system. Is this correct?
Also in 5) above how do you do that?
thanks
bob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rxe MW PR for rdma-core
2021-06-25 15:04 ` Bob Pearson
@ 2021-06-25 16:20 ` Jason Gunthorpe
0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-06-25 16:20 UTC (permalink / raw)
To: Bob Pearson; +Cc: Leon Romanovsky, linux-rdma@vger.kernel.org
On Fri, Jun 25, 2021 at 10:04:37AM -0500, Bob Pearson wrote:
> On 6/25/21 9:39 AM, Jason Gunthorpe wrote:
> > On Thu, Jun 24, 2021 at 11:59:14PM -0500, Bob Pearson wrote:
> >
> >> It took a few hours but I finally managed to get rid of the merge
> >> commits in the rxe MW PR. It's back out there at github. I lost the
> >> name change Jason had made when I deleted and reforked my repo. I
> >> remade the update kernel headers commit without the ??. It still
> >> passes all the screening tests.
> >
> > You should never have to delete and refork with git.
> >
> > Force push fixes all mistakes.
> >
> > The sequence to fix your situation is
> >
> > 1) Starting at the bad branch merge to latest rdma-core
> > 2) Create a new branch on latest rdma-core
> > 3) Use 'git cherry-pick' on each non-merge commit from the
> > bad branch
> > 4) Diff the bad/good branch to make sure nothing got missed in the
> > merges
> > 5) Reset the bad branch to the new branch's commit ID.
> > 6) Force push the fixed branch to github.
> >
> > In future use 'git rebase' instead of 'git merge'
> >
> > Jason
> >
> I have a question about how the various trees are arranged.
> I started by cloning the rdma-core tree from github to my local machine (i.e. origin master).
> Then later I added my own github account and forked the rdma-core tree.
> I have a link to is in my local .git/config (i.e. my-rdma-core).
> Normally I do a git pull from origin which is shorthand for git fetch + git merge (I think??)
> To rebase instead do you have to first do a fetch then a rebase or can you set the rebase flag in
> .git/config?
> I also do updates in the github web site from rdma-core to my copy there. I was having a hard time
> getting the private github tree and the local tree to match (because of merge commits)
Avoid creating merge commits in the first place, use rebase not merge
to rejoin different trees.
You should have in your git remotes something like:
github git@github.com:jgunthorpe/rdma-plumbing.git
lr-github git@github.com:linux-rdma/rdma-core.git
Then when you do a new task do something like
git fetch lr-github
git branch foo-task lr-github/master
git checkout foo-task
<blah blah>
git push -f github foo-task
And when you need to fix up foo-task don't merge but
git fetch lr-github
git rebase lr-github/master
git push -f github foo-task
> In the github docs that I read last evening they seem to recommend
> cloning the forked github tree instead of the upstream tree on your
> local system. Is this correct?
Who you clone from only setups a default remote called origin. You can
always change this with the 'git remote' commands to whatever you want
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-25 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-25 4:59 rxe MW PR for rdma-core Bob Pearson
2021-06-25 14:39 ` Jason Gunthorpe
2021-06-25 15:04 ` Bob Pearson
2021-06-25 16:20 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox