Re: Help with git - fetch earlier src version
- In reply to: parv/FreeBSD: "Re: Help with git - fetch earlier src version"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Dec 2022 00:12:48 UTC
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