From owner-freebsd-current@freebsd.org Tue Dec 29 15:11:08 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CE8C4C2550 for ; Tue, 29 Dec 2020 15:11:08 +0000 (UTC) (envelope-from monochrome@twcny.rr.com) Received: from p-impout009.msg.pkvw.co.charter.net (p-impout009aa.msg.pkvw.co.charter.net [47.43.26.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4yY71T09z4hJj for ; Tue, 29 Dec 2020 15:11:06 +0000 (UTC) (envelope-from monochrome@twcny.rr.com) Received: from [192.168.13.11] ([45.47.33.158]) by cmsmtp with ESMTP id uGeOkC8BrgxBouGeOkS9kg; Tue, 29 Dec 2020 15:11:05 +0000 X-Authority-Analysis: v=2.3 cv=eddDgIMH c=1 sm=1 tr=0 a=VvwePSPmDFBOGFNvGtd2Cw==:117 a=VvwePSPmDFBOGFNvGtd2Cw==:17 a=IkcTkHD0fZMA:10 a=KUqz1aUFNtIYWFtFfdEA:9 a=QEXdDO2ut3YA:10 Subject: Re: git and the loss of revision numbers To: freebsd-current@freebsd.org References: <54116640-E6A1-4C53-9D7E-4384F942628E@ellael.org> <8ABAC674-89AA-47BE-996C-4DF6E7713F21@ellael.org> <53dd689b-2401-8e90-f332-50c60c549c2e@FreeBSD.org> <1d1e2003-0cc1-6e67-0ceb-f0fcba03f8f7@twcny.rr.com> <6a83684d-ee5b-5002-3553-7b383f02768c@nomadlogic.org> From: monochrome Message-ID: <7bfab675-ddb4-bf53-d818-d35667c74522@twcny.rr.com> Date: Tue, 29 Dec 2020 10:11:04 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfH5fecbTKWYJ11GifqKXVQ9ja4M8DDdvxlY9zGbvPzAnfrB3y2NnnhqaOEZ0B3LM12Z+KefaFXviJMbaN+RwJiv0SS4P4sK69hQBpVA4NOzHCufvtdTa 1WzvvPCsFD+l8wmmYLVmLMKC4AvmbqCU8WeFQNVVwxBl7SVlfeJbCl+Ft0p7tSGOfZ4+95NmYNi4RQ== X-Rspamd-Queue-Id: 4D4yY71T09z4hJj X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.30 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[45.47.33.158:received]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[47.43.26.140:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:47.43.26.0/24]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[rr.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[47.43.26.140:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[47.43.26.140:from]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:40294, ipnet:47.43.24.0/21, country:US]; MIME_TRACE(0.00)[0:+]; MAILMAN_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 15:11:08 -0000 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 is a wrong tool here. > I personally would use git reset --hard . > 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. >