Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2022 08:33:37 -1000
From:      "parv/FreeBSD" <parv.0zero9+freebsd@gmail.com>
To:        "Edward Sanford Sutton, III" <mirror176@hotmail.com>
Cc:        stable@freebsd.org
Subject:   Re: Help with git - fetch earlier src version
Message-ID:  <CABObuOpJdf5Us2v%2B58V2OL7ty1A3z_Y9so_GodGoyxF=fWcKsg@mail.gmail.com>
In-Reply-To: <CO1PR11MB4770B5F73728B2C986C6B36FE6EB9@CO1PR11MB4770.namprd11.prod.outlook.com>
References:  <3eae7bee-d0e2-da47-bd15-cf9f72d583ff@nethead.se> <CO1PR11MB4770B5F73728B2C986C6B36FE6EB9@CO1PR11MB4770.namprd11.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000fc7f6205f05ad574
Content-Type: text/plain; charset="UTF-8"

On Wed, Dec 21, 2022 at 5:09 AM Edward Sanford Sutton, III wrote:

> On 12/21/22 05:56, Per olof Ljungmark wrote:
> > I am facing the same issue as in
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268492
> > or possibly
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267421
> > with a T490 laptop.
> >
> > Can someone please help with the git command to fetch an earlier
> > version, for example the one for the amd64 December 9th. snapshot?
>
>    If you already have a checkout of stable/13, you made no local
> changes, you don't share that repo with anyone, and wanted to roll it
> back to a76fa7bb6cb721bcccc257ddbc4398d25dc8def8 which came 2022-12-08
> 01:18:32 +0000 just before a linuxkpi patch:
>
> git reset --hard a76fa7bb6cb721bcccc257ddbc4398d25dc8def8
>

"reset"? Would "checkout" not work ...

  git checkout a76fa7bb6cb721bcc

... ?

When you want to return to the previous state you can run:
>
> git merge
>


"merge" would add a useless point in the history, as I see no changes
being made or suggested. Why should not use "reset" again as earlier
(to switch to "stable/13")?


And, to switch back to "stable/13", use "checkout" or "switch" ...

  git switch stable/13


- parv



>    I thought --soft should work or excluding that parameter entirely to
> change your tree to that commit and that --hard destroys records of
> future commits from your git tree but that doesn't seem to be the case.
>    You could also create another branch and revert just select commits
> from it so you can otherwise include useful changes (presuming they do
> not also depend on the reverted changes).
>
...

--000000000000fc7f6205f05ad574
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace">On Wed, Dec 21, 2022 at 5:09 AM Edward Sanford Sutton, =
III wrote:</div></div><div class=3D"gmail_quote"><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex">On 12/21/22 05:56, Per olof Ljungmark wrote:<br>
&gt; I am facing the same issue as in<br>
&gt; <a href=3D"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268492"=
 rel=3D"noreferrer" target=3D"_blank">https://bugs.freebsd.org/bugzilla/sho=
w_bug.cgi?id=3D268492</a><br>
&gt; or possibly<br>
&gt; <a href=3D"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267421"=
 rel=3D"noreferrer" target=3D"_blank">https://bugs.freebsd.org/bugzilla/sho=
w_bug.cgi?id=3D267421</a><br>
&gt; with a T490 laptop.<br>
&gt; <br>
&gt; Can someone please help with the git command to fetch an earlier <br>
&gt; version, for example the one for the amd64 December 9th. snapshot?<br>
<br>
=C2=A0 =C2=A0If you already have a checkout of stable/13, you made no local=
 <br>
changes, you don&#39;t share that repo with anyone, and wanted to roll it <=
br>
back to a76fa7bb6cb721bcccc257ddbc4398d25dc8def8 which came 2022-12-08<br>
01:18:32 +0000 just before a linuxkpi patch:<br>
<br>
git reset --hard <span class=3D"gmail_default" style=3D"font-family:monospa=
ce"></span>a76fa7bb6cb721bcccc257ddbc4398d25dc8def8<br></blockquote><div><b=
r></div><div style=3D"font-family:monospace" class=3D"gmail_default">&quot;=
reset&quot;? Would &quot;checkout&quot; not work ...</div><div style=3D"fon=
t-family:monospace" class=3D"gmail_default"><br></div><div>=C2=A0 git check=
out a76fa7bb6cb721bcc</div><div><br></div><div style=3D"font-family:monospa=
ce" class=3D"gmail_default">... ?</div><div><br></div><blockquote class=3D"=
gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20=
4,204,204);padding-left:1ex">
When you want to return to the previous state you can run:<br>
<br>
git merge<br></blockquote><div><br></div><div><br></div><div><div style=3D"=
font-family:monospace" class=3D"gmail_default">&quot;merge&quot; would add =
a useless point in the history, as I see no changes</div><div style=3D"font=
-family:monospace" class=3D"gmail_default">being made or suggested. Why sho=
uld not use &quot;reset&quot; again as earlier</div><div style=3D"font-fami=
ly:monospace" class=3D"gmail_default">(to switch to &quot;stable/13&quot;)?=
</div><div style=3D"font-family:monospace" class=3D"gmail_default"><br></di=
v><br></div><div><div style=3D"font-family:monospace" class=3D"gmail_defaul=
t">And, to switch back to &quot;stable/13&quot;, use &quot;checkout&quot; o=
r &quot;switch&quot; ...</div></div><div><br></div><div><div style=3D"font-=
family:monospace" class=3D"gmail_default">=C2=A0 git switch stable/13</div>=
</div><div><br></div><div><br></div><div><div style=3D"font-family:monospac=
e" class=3D"gmail_default"></div><div style=3D"font-family:monospace" class=
=3D"gmail_default">- parv</div><br></div><div>=C2=A0<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex">
=C2=A0 =C2=A0I thought --soft should work or excluding that parameter entir=
ely to <br>
change your tree to that commit and that --hard destroys records of <br>
future commits from your git tree but that doesn&#39;t seem to be the case.=
<br>
=C2=A0 =C2=A0You could also create another branch and revert just select co=
mmits <br>
from it so you can otherwise include useful changes (presuming they do <br>
not also depend on the reverted changes).<br></blockquote><div><div style=
=3D"font-family:monospace" class=3D"gmail_default">...</div><div style=3D"f=
ont-family:monospace" class=3D"gmail_default"></div><br></div></div></div>

--000000000000fc7f6205f05ad574--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOpJdf5Us2v%2B58V2OL7ty1A3z_Y9so_GodGoyxF=fWcKsg>