Re: git and the loss of revision numbers

From: monochrome <monochrome_at_twcny.rr.com>
Date: Tue, 29 Dec 2020 10:11:04 -0500
ok, this appears to be what I was looking for

example:
git reset --hard f20c0e331
then:
git pull --ff-only
is again able to update as normal

I should point out also that this is from the point of view of any 
random person just building freebsd from source, not a developer, so 
there are no local changes. Though it does blow away changes to the conf 
file, that's a lesser issue to deal with.

thanks!

On 12/29/20 9:37 AM, Andriy Gapon wrote:
> On 2020-12-29 02:56, Pete Wright wrote:
>>
>> On 12/28/20 4:38 PM, monochrome wrote:
>>> what would be the git command for reverting source to a previous
>>> version using these numbers? for example, with svn and old numbers:
>>> svnlite update -r367627 /usr/src
>>>
>> I will generally just checkout the short git hash like so in my local
>> checkout:
>> $ git checkout gb81783dc98e6
>>
>> you can quickly get the hashes by running "git log" from your checkout.
> 
> I think that git checkout <commit> is a wrong tool here.
> I personally would use git reset --hard <commit>.
> Note that that command would also revert any local uncommitted changes
> as well!
> 
> My view of the difference between the commands:
> - checkout: stage[*] a change that would modify the current state of the
> branch to the selected commit's state
> - reset: change the current branch (its head) to point to the selected
> commit
> 
> [*] by stage I mean modify the working copy and the index.
> That is, if after git checkout you would run git commit then you would
> commit a change that reverts the current branch to the selected point.
> 
Received on Tue Dec 29 2020 - 14:11:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC