I think when you've merged with master a few times already it gets
fiddly to do anything other than what Chris suggests. The rebase can
be worth it if there was a clean commit history but if you're
squashing then you can just do it the direct way.

I would do this like:

$ git checkout mybranch
$ git checkout -b mybranch_backup  # make a backup!
$ git checkout mybranch
$ git fetch upstream
$ git merge upstream/master
$ git diff upstream/master > mybranch.diff
$ git reset --hard HEAD~1000   # <-- wipe 1000 commits, more might be needed...
$ git pull upstream/master
$ git apply mybranch.diff

Then you add, commit etc, use Co-authored-by for other authors and finally

$ git push --force

Oscar

On Thu, 13 May 2021 at 17:47, gu...@uwosh.edu <gu...@uwosh.edu> wrote:
>
> Having tried various versions of what Matthias suggests, I think the solution 
> for my case is probably what Chris suggests.
>
> Thanks,
> Jonathan
>
> On Thursday, May 13, 2021 at 10:47:23 AM UTC-5 matthia...@gmail.com wrote:
>>
>> Hi Jonathan.
>>
>> On Thu, May 13, 2021 at 3:02 PM gu...@uwosh.edu wrote:
>> >
>> > Jisoo,
>> >
>> > If you can get it to work that would be great. I tried to squash 
>> > everything into one commit in PR #21333, but I could not get GIT to do it. 
>> > I'm not sure why. If you do get it to work, please let me know how.
>>
>> You could do that:
>>
>> git rebase master --interactive
>>
>> Your favorite editor will be opened and you can replace the "pick"
>> with "squash" or "fixup" as you like.
>> After saving the file and closing the editor, your new commit(s) will
>> be available.
>>
>> This will keep the author information.
>>
>> HTH,
>> Matthias
>>
>> >
>> > Jonathan
>> >
>> > On Wednesday, May 12, 2021 at 10:53:05 PM UTC-5 JSS95 wrote:
>> >>
>> >>
>> >> Jonathan, may I squash the commits when the PR is merged? This means that 
>> >> your 80 commit logs will be lost, but you will still have the credits as 
>> >> a co-author.
>> >>
>> >> Jisoo Song
>> >> 2021년 5월 12일 수요일 오전 9시 24분 39초 UTC+9에 gu...@uwosh.edu님이 작성:
>> >>>
>> >>> > I called myself naive, in that I suppose I think it would ideally know
>> >>> > that SymPy would not generate ambiguous results. One simple answer here
>> >>> > might be not to supply a simple rendering of Equation(a,b) except to 
>> >>> > for
>> >>> > use with TeX, where I suppose it would be possible to render the '=' in
>> >>> > a larger size, or different colour.
>> >>>
>> >>> > Imagine what would happen if someone cut and pasted an Equation object
>> >>> > rendered using '=' to another place in the code.
>> >>>
>> >>> Yes, this is something I have struggled with what might work best. 
>> >>> Presently, SymPy latex output in a Jupyter notebook converts `*` and 
>> >>> `**` to more standard representations, which cannot be copied and pasted 
>> >>> into code. The programmer solution is to assign the expression to a name 
>> >>> and use that name where you want the code version. This works equally 
>> >>> well for the Eqn object. I would still like to be able to copy and paste 
>> >>> from the output, which means we may want something like what Sagemath 
>> >>> used to do, which allowed you to toggle between latex and code view. I 
>> >>> think that capability went away in the Jupyter compatible version, but 
>> >>> have not tested it recently.
>> >>>
>> >>> I agree that when Latex output is not used the output should probably be 
>> >>> in a representation that can be directly copies into code. That is an 
>> >>> easy change. After I grade my exams I will incorporate it into the 
>> >>> various versions.
>> >>>
>> >>> Jonathan
>> >>>
>> >>> On Monday, May 10, 2021 at 8:47:02 AM UTC-5 da...wrote:
>> >>>>
>> >>>> On 09/05/2021 23:52, wrote:
>> >>>> > David,
>> >>>> >
>> >>>> > I do not think you are being naive. The choice of representation is to
>> >>>> > keep things as close to standard mathematics as possible. However,
>> >>>> > your suggestions are approaches taken by others. For example Sagemath
>> >>>> > uses a==4 as the way to input and display something similar to the
>> >>>> > proposed Equation type. My problem with this is that it looks like the
>> >>>> > logical comparison operator in most computer languages that should
>> >>>> > yield True or False. I am not sure that is very important to most
>> >>>> > people doing math, but since I do both coding and math it bothers me.
>> >>>>
>> >>>> Well of course, even people who don't do coding will understand the
>> >>>> other meaning of '=' within SymPy work.
>> >>>>
>> >>>> I called myself naive, in that I suppose I think it would ideally know
>> >>>> that SymPy would not generate ambiguous results. One simple answer here
>> >>>> might be not to supply a simple rendering of Equation(a,b) except to for
>> >>>> use with TeX, where I suppose it would be possible to render the '=' in
>> >>>> a larger size, or different colour.
>> >>>>
>> >>>> Imagine what would happen if someone cut and pasted an Equation object
>> >>>> rendered using '=' to another place in the code.
>> >>>>
>> >>>> David
>> >>>>
>> >>>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "sympy" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to sympy+un...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/sympy/a2aebc5c-0d80-4fe6-a906-703d42d8d128n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/e5781162-6a5b-4742-9192-f67ca7d9f409n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxREjsXz9dr%2BEPL6i7qLppm74ewVE8EseNyoQ2wim-eFAQ%40mail.gmail.com.

Reply via email to