From owner-freebsd-git@freebsd.org Thu Jan 28 15:07:09 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 6B9915272CC for ; Thu, 28 Jan 2021 15:07:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DRP2h4TxBz3jCy for ; Thu, 28 Jan 2021 15:07:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82b.google.com with SMTP id t17so4273151qtq.2 for ; Thu, 28 Jan 2021 07:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jw86SENsznXY9xtjT71C/NJI0waRZUudI36V5SbtSvY=; b=Tv59kfcYSHeBDqOhssxQH+fMOTpCna4eD742fWhyJpJs6+nGf76bojKOBn1i1UQUMT D94h0UQgba5jyvtSdLJ4Ym7xs74L4q+jGLXCAKOiteoOZ8E+/WuyvKRhnE1hI5TsEQf2 kN/UaVj0i+Q/mo29kLZKN+VHr1xlEaKACzyZDHOKPZjVK281QCu0iSupEP2oJCqU9hVE 1oDmBHVBTBc9NGnKrLHp8Z4lctNmKzpQOEj1OkCqaJe7vVXQit2wgtrfhq9SIvuxptA/ j8f30IoSGYf+XcAB4CuiXF6ZbY4eTqJwJONLHdwVx3I6eEsJNe1aUdTFwWzKkAHxu+PN AmYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jw86SENsznXY9xtjT71C/NJI0waRZUudI36V5SbtSvY=; b=OjgaBZNV3j3zMZuvBB2GI8JXdoIrrwnnkfPsiWhaIcCismHj6ZZgzs9enbpk+Qkr8v UV4xx1Mt+QQs/1/LEFSbBisoK9hew4CtplvD1Ulvg75A/46m1xovohSYLa9Ho200bdmI Tx+vggYbMPzy3NTelnwE0Q9KLE3I6bLHqKtWAFleWbAwuj2hLek1Mlv3gd+imR1Fs8Bx 2oJthCoxlDnu5kK+ZEniwqYGEQI2WDkE7H73DKaR9ZYw3dpIM70ADiwinntLXDOPL+tX r0otph1+tbaqhm7KG7WYyBFsswPBm/INqumIWRHQLo68ZIe4uNKvDsuhnNQJp6lvHK/0 AFHg== X-Gm-Message-State: AOAM533RWscJJRziy9oScBScBGh0KDHWBa9cUZz5UMHQDf+ei2+zJ6vP 3W7DnaZLQTxWTM0w/Ot8nR7pWwj1WZZ0CejlSkDNolDavFc1bA== X-Google-Smtp-Source: ABdhPJw4OW50qCJpOQc38pv0Tv42pGpeD0rmsKNmDdhYkgu4gaPbS0jEne+jb0HK1PcoD2FycglfrsRFrgfGzTtBwmE= X-Received: by 2002:ac8:72cc:: with SMTP id o12mr14644224qtp.101.1611846427509; Thu, 28 Jan 2021 07:07:07 -0800 (PST) MIME-Version: 1.0 References: <20210126151017.4a9dd711@zeta.dino.sk> <00F58366-4178-458E-8865-E1A2E5324EB4@yahoo.com> <20210128073315.44377b29@zeta.dino.sk> <1F06D4FA-D3B0-4B25-AC99-14A0F31C2ABF@yahoo.com> In-Reply-To: <1F06D4FA-D3B0-4B25-AC99-14A0F31C2ABF@yahoo.com> From: Warner Losh Date: Thu, 28 Jan 2021 08:06:55 -0700 Message-ID: Subject: Re: git setup/usage question To: Mark Millard Cc: Milan Obuch , freebsd-git X-Rspamd-Queue-Id: 4DRP2h4TxBz3jCy X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Tv59kfcY; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::82b:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.997]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82b:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[yahoo.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::82b:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-git]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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: Thu, 28 Jan 2021 15:07:09 -0000 On Thu, Jan 28, 2021 at 2:45 AM Mark Millard via freebsd-git < freebsd-git@freebsd.org> wrote: > > > On 2021-Jan-27, at 22:33, Milan Obuch wrote: > >>>> . . . > >> > >> It looks to me like he is using a configuration (--bare) > >> outside the range FreeBSD is intending to deal with and > >> so he needs his own fairly-unique procedures for using > >> git for FreeBSD activity. > > > > > > I think exactly the opposite - the way I did it looks (at least to me) > > as a natural way extending simple case described in Warner's Git Primer > > if one desires to track multiple branches for whatever reason. > > FYI: Warner documented using worktrees without using --bare > for the FreeBSD git context and stated that he would not > document --bare use. I tried what he documented and it > worked just fine for my use. > I experimented with bare and hated it. I have about 30 in-flight patches, most of them trivial. Doing this for a few years, I've found the following: 1. worktrees are great for long-term things. So I have a work tree for stable/12 and main and occasionally for big projects. 2. 30 small branches with 1 change is better than 1 branch with 30 changes. As crazy as it sounds, it's easier to manage, especially when waiting for reviews. 3. It's much better to switch branches often and practice good hygiene by committing all changes. 4. Commit early, commit often, rebase frequently to curate the changes as you go. 5. Keep changes small. 6. Get the basics into review early, especially ones that are surprising. I make liberal use of git cherry-pick to move patches from branch to branch if I notice something while working on something else. I rebase to reorder and reorganize patches. I keep changes small and as independent as possible. There's no advantage to --bare for my workflow. When I tried it, I wound up with more complexity without any benefit. Same when I over-used worktrees. For me, there was more benefit from having lots of small branches and always keeping a clean tree. I avoided stash, though it's closer to mercurial's mq workflow I used to love (unpushed patches tend to go stale quickly). These are among the reasons I've left the lots of work trees and/or using a bare repo stuff undocumented: IMHO it just adds complexity and confusion for the vast majority of users w/o there being much benefit. People can extrapolate from what's documented should they have special needs. Warner