From owner-freebsd-git@freebsd.org Sat May 1 20:08:54 2021 Return-Path: Delivered-To: freebsd-git@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 0BB4F636A42 for ; Sat, 1 May 2021 20:08:54 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FXgKx6zyYz4rnk for ; Sat, 1 May 2021 20:08:53 +0000 (UTC) (envelope-from pi@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id EE2EA636A41; Sat, 1 May 2021 20:08:53 +0000 (UTC) Delivered-To: git@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 EDF14636A40 for ; Sat, 1 May 2021 20:08:53 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from fc.opsec.eu (fc.opsec.eu [IPv6:2001:14f8:200:4::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FXgKx6Y0zz4rRy for ; Sat, 1 May 2021 20:08:53 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from pi by fc.opsec.eu with local (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lcvv0-0009xS-6J; Sat, 01 May 2021 22:08:50 +0200 Date: Sat, 1 May 2021 22:08:50 +0200 From: Kurt Jaeger To: Warner Losh Cc: git@freebsd.org Subject: Re: Ports tree have been migrated to git Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4FXgKx6Y0zz4rRy X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2021 20:08:54 -0000 Hi! > > Right now, for reasons that are unclear to me, I still have some > > local commit hanging around in that tree that I can't get removed. [...] > > Can someone please help me understand how to just get rid of > > some commit not yet pushed ? > git reset --hard HEAD^ > > removes the last commit from the branch you have checked out. Ok, I applied this once and had the revert of my local commit removed. I then applied it a second time, and now a git show displays me the commit 9df78543e018a28c73fc97caff2c3ac9cc7b62f7 (the transcode revert from se@) as the last uncommitted (?) change in my poudriere ports tree. I expected 'git show' to return nothing, so that I know that my tree is in sync with the remote tree. > You can put > any rev in place of HEAD^ if you know that is where you want to roll back > to. I just want to be back in the state where git show does not show any changes 8-} > You might use "freebsd/main" to reset to upstream (assuming you use the > freebsd origin convention). I think I follow that convention, but: git reset --hard freebsd/main fatal: ambiguous argument 'freebsd/main': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' > Also, git reflog will remember, for a while, all the branch moves and you > can use that to recover those local commits. So reflog showed: [...] 01fbe73ae HEAD@{14}: reset: moving to HEAD 01fbe73ae HEAD@{15}: revert: Revert "net/dante: update 1.4.2 -> 1.4.3" 1f182d137 HEAD@{16}: reset: moving to HEAD 1f182d137 HEAD@{17}: reset: moving to HEAD and I tried to get to the state @ 1f182d137: which still is not the state I want to be in, because now git shows me 1f182d137defe95f4b4b46a3003f203957021a9d again. I'm really lost here 8-( Looks more and more like https://xkcd.com/1597/ -- pi@FreeBSD.org +49 171 3101372 Now what ?