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

next in thread | previous in thread | raw e-mail | index | archive | help
In message <CABObuOpJdf5Us2v+58V2OL7ty1A3z_Y9so_GodGoyxF=fWcKsg@mail.gmail.c
om>
, "parv/FreeBSD" writes:
> --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).
> >
> ...

git checkout -b my_revision GIT_HASH is the best option allowing you to 
switch back and forth without incurring the overhead of a merge commit.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0
 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221222001248.BC31718F>