[petsc-dev] rebase problem
Satish Balay
balay at mcs.anl.gov
Mon Dec 7 09:27:26 CST 2020
I think the likely cause:
- you might have rebased branch over latest master
- and then - instead of 'push -f' - you did a merge
of rebased branch with the unrebased snapshot.
This usually causes such issues..
When a branch is rebased/collapsed - its best to make sure the process
is verified [that it does not have such merges] and completed [i.e
origin/branch is correctly updated]
Satish
On Sun, 6 Dec 2020, Mark Adams wrote:
> I did it with HEAD~5 but it had like 40 commits. I rebased over master
> recently and I think it sucked in the commits that I pulled in from that.
>
> But then I aborted that and rebased over master. It seems to be OK now,
>
> Thanks,
>
> On Sun, Dec 6, 2020 at 8:03 PM Matthew Knepley <knepley at gmail.com> wrote:
>
> > Mark, I think you need to tell it exactly where to start for your rebase.
> > Suppose you have 4 commits. You want something like
> >
> > git rebase -i HEAD~4
> >
> > Thanks,
> >
> > Matt
> >
> > On Sun, Dec 6, 2020 at 5:19 PM Mark Adams <mfadams at lbl.gov> wrote:
> >
> >> When I rebase over master I get conflicts in my files, alas.
> >>
> >> I am thinking I should skip all the conflicts and then fix conflicts in
> >> the files that I touched and checkout any others from master ... Satish?
> >>
> >> 17:12 1 adams/landau-gpu-assembly *+|REBASE 29/58 ~/petsc$ git status
> >> # HEAD detached from 3659b78
> >> # You are currently rebasing branch 'adams/landau-gpu-assembly' on
> >> '3659b78'.
> >> # (fix conflicts and then run "git rebase --continue")
> >> # (use "git rebase --skip" to skip this patch)
> >> # (use "git rebase --abort" to check out the original branch)
> >> #
> >> # Unmerged paths:
> >> # (use "git reset HEAD <file>..." to unstage)
> >> # (use "git add <file>..." to mark resolution)
> >> #
> >> # both modified: include/petsclandau.h
> >> # both modified: src/ts/utils/dmplexlandau/cuda/landaucu.cu
> >> # both modified: src/ts/utils/dmplexlandau/kokkos/landau.kokkos.cxx
> >> # both modified: src/ts/utils/dmplexlandau/plexland.c
> >> # both modified: src/ts/utils/dmplexlandau/tutorials/output/ex1_0.out
> >> # both modified: src/ts/utils/dmplexlandau/tutorials/output/ex2_0.out
> >>
> >> On Sun, Dec 6, 2020 at 4:35 PM Jacob Faibussowitsch <jacob.fai at gmail.com>
> >> wrote:
> >>
> >>> I would first rebase your branch over latest master and then perform
> >>> your squash. Otherwise you will be squashing other commits which have
> >>> become part of your branch history (perhaps via updating your branch by
> >>> intermittently merging, not rebasing, master into it). It seems like that
> >>> is what is happening right now, although maybe Satish will know better.
> >>>
> >>> Best regards,
> >>>
> >>> Jacob Faibussowitsch
> >>> (Jacob Fai - booss - oh - vitch)
> >>> Cell: (312) 694-3391
> >>>
> >>> On Dec 6, 2020, at 15:30, Mark Adams <mfadams at lbl.gov> wrote:
> >>>
> >>> This is the status after the first fail. I have nothing to do with these
> >>> files. There are diffs, but I don't know anything about them.
> >>>
> >>> Maybe I should skip failures (lot of them) and then checkout the
> >>> conflicted files from master, then rebase over master?
> >>>
> >>> Thanks,
> >>> Mark
> >>>
> >>>
> >>> 6:24 1 adams/landau-gpu-assembly *+|REBASE-i 41/76 ~/petsc$ git status
> >>> -uno
> >>> # HEAD detached from 564e279
> >>> # You are currently rebasing branch 'adams/landau-gpu-assembly' on
> >>> '0c5056a'.
> >>> # (fix conflicts and then run "git rebase --continue")
> >>> # (use "git rebase --skip" to skip this patch)
> >>> # (use "git rebase --abort" to check out the original branch)
> >>> #
> >>> # Changes to be committed:
> >>> # (use "git reset HEAD <file>..." to unstage)
> >>> #
> >>> # new file: src/snes/tutorials/output/ex19_asm_matconvert.out
> >>> #
> >>> # Unmerged paths:
> >>> # (use "git reset HEAD <file>..." to unstage)
> >>> # (use "git add <file>..." to mark resolution)
> >>> #
> >>> # both modified: src/snes/tutorials/ex19.c
> >>> #
> >>> # Untracked files not listed (use -u option to show untracked files)
> >>> 16:25 adams/landau-gpu-assembly *+|REBASE-i 41/76 ~/petsc$
> >>>
> >>> On Sun, Dec 6, 2020 at 3:48 PM Jacob Faibussowitsch <jacob.fai at gmail.com>
> >>> wrote:
> >>>
> >>>> Mark,
> >>>>
> >>>> What is the output of git status when it fails? Any files that are
> >>>> marked staged/uncommitted?
> >>>>
> >>>> I’ve found that rebase will only work out of the box if your branch
> >>>> history is completely linear, i.e. no merge commits in between. If there
> >>>> are merge commits then git is not always able to resolve them. If this is
> >>>> the case then when the rebase fails at some commit some of the files will
> >>>> be staged with the changes from both commits that you must __manually__
> >>>> reconcile.
> >>>>
> >>>> Best regards,
> >>>>
> >>>> Jacob Faibussowitsch
> >>>> (Jacob Fai - booss - oh - vitch)
> >>>> Cell: (312) 694-3391
> >>>>
> >>>> On Dec 6, 2020, at 14:22, Mark Adams <mfadams at lbl.gov> wrote:
> >>>>
> >>>> I am doing a rebase -i to squash commits and even if I do nothing git
> >>>> tris to apply about 7) commits, but starts to fail at #41 and if I try to
> >>>> --skip it it starts failing on every one. The error message is not very
> >>>> useful to me:
> >>>>
> >>>> 15:15 adams/landau-gpu-assembly> ~/petsc$ git rebase -i HEAD~5
> >>>> error: could not apply a8e4255... Add test of PCASMSetSubMatType with
> >>>> nonlinear problem
> >>>>
> >>>> When you have resolved this problem, run "git rebase --continue".
> >>>> If you prefer to skip this patch, run "git rebase --skip" instead.
> >>>> To check out the original branch and stop rebasing, run "git rebase
> >>>> --abort".
> >>>> Could not apply a8e4255... Add test of PCASMSetSubMatType with
> >>>> nonlinear problem
> >>>>
> >>>> Any ideas? Maybe rebase over master first?
> >>>>
> >>>> Thanks,
> >>>> Mark
> >>>>
> >>>>
> >>>>
> >>>
> >
> > --
> > What most experimenters take for granted before they begin their
> > experiments is infinitely more interesting than any results to which their
> > experiments lead.
> > -- Norbert Wiener
> >
> > https://www.cse.buffalo.edu/~knepley/
> > <http://www.cse.buffalo.edu/~knepley/>
> >
>
More information about the petsc-dev
mailing list