From nobody Mon Aug 14 18:22:49 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RPjSJ70gmz4Tq54 for ; Mon, 14 Aug 2023 18:22:56 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RPjSJ53bWz4GxQ for ; Mon, 14 Aug 2023 18:22:56 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-977e0fbd742so600786366b.2 for ; Mon, 14 Aug 2023 11:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692037372; x=1692642172; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=YT03iU5aE4ZXEztiHDvgxU8UkMF0dCwliyyllv/ANwo=; b=Ny0l820SWATQy0m6LqxMDNhAxuugDRy1hGp5pzzHSgulgZ5IeYORJEZp78HU9whP9p iYWbICDdKiYL2cz/CuuM5XMAZ+FdFgy9rXyUDCqxrnQkCV5BweWltrgNgpd2FuAF6fW/ mb0YsGSxSDZ1JqxsdGvxH9I+0qTz3VzkCC0oJjl6IshJrZmVfTPR3aS9R+kvyQUJDX0M 74QOWbnXXvX0UC8SiIBNgK95+8yTaw8dsIGrh0YR1WhgzqD9R4QvoJCCn9T96Pwcdb7i LBHj+VIF+RxPq+240cDMddvIKpC1SkDRDz1zs1aB51+eqLoTW4AKgvsN4OOpPfDr/rMJ vxlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692037372; x=1692642172; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YT03iU5aE4ZXEztiHDvgxU8UkMF0dCwliyyllv/ANwo=; b=a6TMd5CLU9TJcYSfW7g5DpwFjjmQAjEQiJwdqG+2tlIYtTgeDC2msnNzvgWVM7jcir wba2BngbVlignVx5aMivI/lA38v/C3BmXJRukqK3aiMyle2lkProNY9Z5EjsQ5RPYgsx hmkLAoWkSb04KFI6LdBKtLMoCXVlEv+TbFofffZzdGsOYyryJBkWuZHcLpgVVdWZH29g O9/kY0lJo1TAyPquQgg/bL/Uuvd/CGe2HDDC8tft0RsU6B4meq+/AgUhkZ6B0PxF8i02 vcqR9JPzGCnSTurJ8KejiRIv8T6XCl4gzDMfhFp2KGpP/D7NcUkjbxkj0QGR0kAq0rhg 2kuQ== X-Gm-Message-State: AOJu0Yyi6vug/P9i6EJz1qzRqUiRWX8+s7+QXb6Ml+TbsGWcw3yTUBHT r17E7CRSJGTLJGh+1GscYQp0pTOur2U= X-Google-Smtp-Source: AGHT+IHh9NLVH/w6hI5zIEbzVKGffUJLLiHqdVUm3C4cuL0/W6NOtUbsdp0bW8Z7kMxmLsackDCa5Q== X-Received: by 2002:a17:907:2cea:b0:99b:8c6f:f3af with SMTP id hz10-20020a1709072cea00b0099b8c6ff3afmr7353131ejc.12.1692037371663; Mon, 14 Aug 2023 11:22:51 -0700 (PDT) Received: from [192.168.1.10] (80-42-66-93.dynamic.dsl.as9105.com. [80.42.66.93]) by smtp.gmail.com with ESMTPSA id ox11-20020a170907100b00b00989828a42e8sm5920303ejb.154.2023.08.14.11.22.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Aug 2023 11:22:50 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------IqeTbsvtORv2mia1QeruZYVt" Message-ID: Date: Mon, 14 Aug 2023 19:22:49 +0100 List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: Resolve merge conflicts Content-Language: en-US To: Warner Losh Cc: freebsd-git References: From: Graham Perrin In-Reply-To: X-Rspamd-Queue-Id: 4RPjSJ53bWz4GxQ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] This is a multi-part message in MIME format. --------------IqeTbsvtORv2mia1QeruZYVt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 14/08/2023 18:22, Warner Losh wrote: > … Generally, I do a 'git rebase -i main $BRANCH' and then … Thanks. lines 20 and 21, I never figured out whether it's possible to rebase against freebsd main. (Alone, git -C /usr/doc rebase is against my fork.) --------------IqeTbsvtORv2mia1QeruZYVt Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 14/08/2023 18:22, Warner Losh wrote:
… Generally, I do a 'git rebase -i main $BRANCH' and then …


Thanks.

<https://reviews.freebsd.org/P609$20-21> lines 20 and 21, I never figured out whether it's possible to rebase against freebsd main.

(Alone, git -C /usr/doc rebase is against my fork.)

--------------IqeTbsvtORv2mia1QeruZYVt-- From nobody Thu Sep 7 18:48:26 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhStn6M45z4rrpL for ; Thu, 7 Sep 2023 18:48:33 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhStm1fsGz3P5X for ; Thu, 7 Sep 2023 18:48:32 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=m0XQ0mBp; spf=pass (mx1.freebsd.org: domain of grahamperrin@gmail.com designates 2a00:1450:4864:20::134 as permitted sender) smtp.mailfrom=grahamperrin@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-501bef6e0d3so2185129e87.1 for ; Thu, 07 Sep 2023 11:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694112509; x=1694717309; darn=freebsd.org; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=5BuJp/cYrkrLmtJjI426Mvx4WEwzYC72Wv2xqp3Jf0M=; b=m0XQ0mBp1t9FzwGoBP9o558j8SH4EiprCSnt/nFRYURv+ZBWoquJVltlW7ZE1/Nh9P kk7srw74xMdx7qRoXNhdZyOkWtl8kRpqAgQR+AlT6YyKcoUuF31UTAc5HNC6OkSlgFDP jHBu9yRCcuxg7fSgx4vEm8M5S9ZlWr/bzbKAdWYxCTUMknmTYwE9pXVzKHWZs2rJNA+C wZ/4/xKaB3o4Y3XfBHfOpvrRbqlOwMYlLUa0LLUDhDxgd/Y/9UR2hoZe9b3/zVYdspGi TXaqjzfXFcbhcA42R/0KTmBh0lsn6mkk9pG3W4XIUL6Gu70YCuxFxC8/2YKAZ8qbz8w1 avLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694112509; x=1694717309; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5BuJp/cYrkrLmtJjI426Mvx4WEwzYC72Wv2xqp3Jf0M=; b=cffvn9vLEy8upmxXRw39AZrqZHFJMM7kTFZU0pZjtnsDdS5xogwjUuUUvVF5ykuO/f YrTQOI2VNPcmuJImrBUHfDm1obu+XqGtpTqFrz56aem4Zb6JqzUXagL5SL5IpYgDYKVQ altxXG6DO+oEstPEbafDg4E3aPOIGFf/iw3bdxBMyPvx41whWfa2YAyT+qP1gtREIXpA A2lefRV5aS1c9i+aFf4fevQEIsqGQ/kjlxYZ4wFKllw1gDyx18WLmiFarKej6fCB2Xrx WxYglR106iZkSJcsvggeWaz61fybFhRDyobOE8pphxClQCZQpIDQop2hFCJW7Ejhn3dg jV2g== X-Gm-Message-State: AOJu0YzyO8pReyf4Dfj2NdBkNfMD41xt7X2ueX8BDRBmraskq0iPBSTE r0lP8mnjZO8Dtu/sZoX1d3s+ALhOB5Y= X-Google-Smtp-Source: AGHT+IFMCQhCBYR2a+CQvV+MQP+1iOSdq4YtzYPzKdzvVHqIV8afmetfBgLR5e3z3fTtr7EKHgee0g== X-Received: by 2002:ac2:4f09:0:b0:501:2071:6784 with SMTP id k9-20020ac24f09000000b0050120716784mr249807lfr.10.1694112509217; Thu, 07 Sep 2023 11:48:29 -0700 (PDT) Received: from [192.168.1.10] (80-42-66-93.dynamic.dsl.as9105.com. [80.42.66.93]) by smtp.gmail.com with ESMTPSA id m16-20020aa7c490000000b005236410a16bsm109772edq.35.2023.09.07.11.48.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Sep 2023 11:48:28 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------lCv9hyIDs0onyzBQjxkbxVH0" Message-ID: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> Date: Thu, 7 Sep 2023 19:48:26 +0100 List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: freebsd-git Content-Language: en-US From: Graham Perrin Subject: Working with forks X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[grahamperrin]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::134:from]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RhStm1fsGz3P5X This is a multi-part message in MIME format. --------------lCv9hyIDs0onyzBQjxkbxVH0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in the FreeBSD project) as a starting point: when the times come to work, locally, with other people's forks, does Git (at the command line) allow an easy way to temporarily use the same local directory? --------------lCv9hyIDs0onyzBQjxkbxVH0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in the FreeBSD project) as a starting point: when the times come to work, locally, with other people's forks, does Git (at the command line) allow an easy way to temporarily use the same local directory?

--------------lCv9hyIDs0onyzBQjxkbxVH0-- From nobody Thu Sep 7 19:03:23 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhTD84vZ3z4s2hy for ; Thu, 7 Sep 2023 19:03:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhTD83JYlz3Txr for ; Thu, 7 Sep 2023 19:03:36 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3a76d882080so910983b6e.2 for ; Thu, 07 Sep 2023 12:03:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694113415; x=1694718215; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=og7HRlUaYuQP9dngVqs0chc+tr0t80M2tYt6DtIdxmk=; b=oxy2NGvMpi3MEGLEkGdQ5uOgkVwMc4xYd366++PkVrnTcBEyso4hwNtEa2o/6sIPIa a1UyPOTuC3TcOG34kpS2in3skcg9u9WbQPrX+oeZEXDb20cGOfwUvysK0O8QDjsDFRd9 e5OS/Ps2TQ0pFFKoaTEv1P8n25j/Q1eG7IfJXKM0E1DA40bjUDbOn7Fntw7lgv4u9+Lu 6k8VnDCpvfGAtTKC8PPhN0LpTxkThr9Uiw9gYCsTCUIa208lWM9xxhj6gGskvwV4A67w R8oJeKVrqXIi/K3mN7ymgIpWIIAZsKA2f5e7PRzGJEh5ZiFqxRG4qkAw9KymJkpQYvna QJsg== X-Gm-Message-State: AOJu0Yw2/Gw1sxZkwdxxIcGrMBgUZTGuWRjsRMx/lzARFJYFYFHviTqf e28h3qfEFkQ/Yz9ZGEVd+1CoUXpuas/bLWIScSs= X-Google-Smtp-Source: AGHT+IGBb39C0s0KMWrIsger81K5swlZXWF/zwiQ2pPikRKTDD9AF9FjW9rAa2a9cEF/4qKWl2edSg8Yt8oN3Q206i4= X-Received: by 2002:a54:4e1b:0:b0:3a7:541c:805c with SMTP id a27-20020a544e1b000000b003a7541c805cmr391232oiy.24.1694113415335; Thu, 07 Sep 2023 12:03:35 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> In-Reply-To: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> From: Alan Somers Date: Thu, 7 Sep 2023 12:03:23 -0700 Message-ID: Subject: Re: Working with forks To: Graham Perrin Cc: freebsd-git Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RhTD83JYlz3Txr On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin wrote: > > With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in the F= reeBSD project) as a starting point: when the times come to work, locally, = with other people's forks, does Git (at the command line) allow an easy way= to temporarily use the same local directory? I do this all the time, if I understand the question correctly. You just need to add a separate git remote for each fork. For example, this sequence of commands will clone the FreeBSD source. Then it will fetch grahamperrin's fork. Then it will checkout a copy of grahamperrin's feature branch. Finally, it will rebase that feature branch onto a branch from the original FreeBSD repo. git clone git@github.com/freebsd/freebsd-src.git cd freebsd-src git remote add grahamperrin git@github.com/grahamperrin/freebsd-src.git git fetch grahamperrin git branch grahamperrin/featureX featureX git checkout featureX git rebase origin/stable/13 From nobody Fri Sep 8 02:39:47 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhgLg6TZlz4s8mQ for ; Fri, 8 Sep 2023 02:39:55 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhgLg3HvSz4NnC; Fri, 8 Sep 2023 02:39:55 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2bcfd3220d3so26346241fa.2; Thu, 07 Sep 2023 19:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694140791; x=1694745591; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=d+/Yu0h65k9gMviQ4l3fRg9rbZm9Tn7/BdmvwUDCSRw=; b=KetrvcgYKqZKO1doRpBcfD0AndcNAYXn6oBOCBTruyVqqFvNHKfZwK/TgeP3BHcmBK 7BEoeoeZGEtKNmfN0DGz2hdFQg1d//WdCBPALv8/jemQg1R/OGhVkcHrfMFAPbMLK/ez 2GcPbdz1WRLLELr3J6Y4ZVdxst+pL7mQ/29UPpsUeu9zk8ewVLPNllLkPW/RtLG8q0Tt 02R6nWXOyvF16N8MPAQ7PjH9oxSO+Uc7IeG6B2gOCbMdRZzH0wQvQxc9ookmSqxZ8HQL Yjf1+6pO26Hmn0UQ7g8as1egY+TRDOE/DEwSiB5zvrmJ/5oTvLcAxtI2TTQKEw4PVi3B Ik3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694140791; x=1694745591; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d+/Yu0h65k9gMviQ4l3fRg9rbZm9Tn7/BdmvwUDCSRw=; b=dV/2zw6+XbZh/BBpvxaltirOFUEzoOTHdAXlNH8aHP7iTT+AAkWQuKaFAK7e27XdPb FMkf4YHOha2gcblP7lfYFYnE+ltXrJOQxspl56yl9g+z0v3MUK66CaQhSw04TPs6WXGf MQVnagBLt6WRtFapBsyBINgWyoBTBJGpn6TAAJ+ZME0JwMpYdBIljubaeZAYBd28W0mh ynFuD8nrhF6pYFwwkoqKpN0eqgMNxNzdcR/C68mSMPmlx6ouA9eXQEkUqcUSbHWlpxW5 1wT0FUPODCH+IFCBcu8r16koOYYrjU6VklPqDXWI5ZGPsq4FDFS3z7PdCeTMU8TyGFst FO8g== X-Gm-Message-State: AOJu0Yy881udhMPWNNipxYr/phGYWK+QvmrWqik7Q59d0Omu5stHoyI+ B+4Nh3aobFoSMah/qZzWWcyMBZpFN75+Uw== X-Google-Smtp-Source: AGHT+IHvJK5/gVYbzxBs0rotmppSu5IZqT8mGzT+z24MJhjan6jbVmjS66DJetVEckKZe7OAaStmWg== X-Received: by 2002:a2e:9694:0:b0:2bc:c004:cc22 with SMTP id q20-20020a2e9694000000b002bcc004cc22mr771191lji.33.1694140791048; Thu, 07 Sep 2023 19:39:51 -0700 (PDT) Received: from [192.168.1.10] (80-42-66-93.dynamic.dsl.as9105.com. [80.42.66.93]) by smtp.gmail.com with ESMTPSA id i18-20020a17090671d200b0099cf840527csm376081ejk.153.2023.09.07.19.39.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Sep 2023 19:39:49 -0700 (PDT) Message-ID: <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> Date: Fri, 8 Sep 2023 03:39:47 +0100 List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: Alan Somers Cc: freebsd-git References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> From: Graham Perrin Subject: Re: Working with forks In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RhgLg3HvSz4NnC On 07/09/2023 20:03, Alan Somers wrote: > On Thu, Sep 7, 2023 at 11:49 AM Graham Perrin wrote: >> With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in the FreeBSD project) as a starting point: when the times come to work, locally, with other people's forks, does Git (at the command line) allow an easy way to temporarily use the same local directory? > I do this all the time, if I understand the question correctly. You > just need to add a separate git remote for each fork. For example, > this sequence of commands will clone the FreeBSD source. Then it will > fetch grahamperrin's fork. Then it will checkout a copy of > grahamperrin's feature branch. Finally, it will rebase that feature > branch onto a branch from the original FreeBSD repo. > > git clone git@github.com/freebsd/freebsd-src.git > cd freebsd-src > git remote add grahamperrin git@github.com/grahamperrin/freebsd-src.git > git fetch grahamperrin > git branch grahamperrin/featureX featureX > git checkout featureX > git rebase origin/stable/13 Thanks. Below (an abbreviated list of branches), what am I doing wrong? % git -C /usr/src config --get remote.origin.url https://github.com/grahamperrin/freebsd-src.git % git -C /usr/src remote add jlduran https://github.com/jlduran/freebsd-src.git % git -C /usr/src fetch jlduran From https://github.com/jlduran/freebsd-src  * [new branch] D37210                                  -> jlduran/D37210 …  * [new branch] nanobsd-embedded-use-makefs             -> jlduran/nanobsd-embedded-use-makefs …  * [new branch] wip-fix-comment-blah                    -> jlduran/wip-fix-comment-blah % git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs nanobsd-embedded-use-makefs fatal: not a valid object name: 'nanobsd-embedded-use-makefs' % If it's relevant: my /usr/src originated from my fork. From nobody Fri Sep 8 02:48:43 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhgY40kXbz4sFjV for ; Fri, 8 Sep 2023 02:48:56 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhgY35cyvz4RXr for ; Fri, 8 Sep 2023 02:48:55 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ua1-f51.google.com with SMTP id a1e0cc1a2514c-79414715edeso533469241.0 for ; Thu, 07 Sep 2023 19:48:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694141335; x=1694746135; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ly2zKIYxAO9ZUWgd+ihbFmE3EEuGBwrmE0DXhlYlc7k=; b=YxnvSVuDFiImvOtf+z1Ir8KADPVYlMmxBmTDXvZ4+fXMDmd9fNFFZ6lDaRzmTl1zrG NnByVgXm3AmZFP07OHOlztzg8w4gouRb/zDDo3oZ0DWoAZIg3w3kWD4emEIZiQhrj5b2 bSE8UJkY6GIUk1QL6IrOETBxXsKz2dMJeuNxCmT4KZn2rumr9ylF+n/apYsOpWwVU0CN LrLgmzdCo+PiQpsbDvACFf3xZbGC/9cg6VS8gtZ/z8u0yukFWh4BDiH5gQDuRyKLB/06 vU08KL0qYQaJzq2bEFEoR+sCcUFsnIftWqvf8sTouDBwcgxaMb7qtpcjgw4OK8u54iOt xW6g== X-Gm-Message-State: AOJu0YwQIPnjOc0VsxFxCGLeIzKmxLh0Qo0tfe9FXQLchYuPMXipcJV0 09jv0P1Sw3Eil9P+awN+3kbvAOVvMUw4zyObcNw= X-Google-Smtp-Source: AGHT+IHaeYGUpVhM387fNTfd6qqyKihUaB+ZSaPSrrUliSiY9Vf+1uTJJjOtYmFJ39AMUrAhIVA/xM3yR0LnHlxcUHA= X-Received: by 2002:a05:6102:524:b0:446:9cc3:ccf with SMTP id m4-20020a056102052400b004469cc30ccfmr1290265vsa.28.1694141334745; Thu, 07 Sep 2023 19:48:54 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> In-Reply-To: <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> From: Alan Somers Date: Thu, 7 Sep 2023 19:48:43 -0700 Message-ID: Subject: Re: Working with forks To: Graham Perrin Cc: freebsd-git Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RhgY35cyvz4RXr On Thu, Sep 7, 2023 at 7:39=E2=80=AFPM Graham Perrin wrote: > > On 07/09/2023 20:03, Alan Somers wrote: > > On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin wrote: > >> With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in th= e FreeBSD project) as a starting point: when the times come to work, locall= y, with other people's forks, does Git (at the command line) allow an easy = way to temporarily use the same local directory? > > I do this all the time, if I understand the question correctly. You > > just need to add a separate git remote for each fork. For example, > > this sequence of commands will clone the FreeBSD source. Then it will > > fetch grahamperrin's fork. Then it will checkout a copy of > > grahamperrin's feature branch. Finally, it will rebase that feature > > branch onto a branch from the original FreeBSD repo. > > > > git clone git@github.com/freebsd/freebsd-src.git > > cd freebsd-src > > git remote add grahamperrin git@github.com/grahamperrin/freebsd-src.git > > git fetch grahamperrin > > git branch grahamperrin/featureX featureX > > git checkout featureX > > git rebase origin/stable/13 > > Thanks. > > Below (an abbreviated list of branches), what am I doing wrong? > > % git -C /usr/src config --get remote.origin.url > https://github.com/grahamperrin/freebsd-src.git > % git -C /usr/src remote add jlduran > https://github.com/jlduran/freebsd-src.git > % git -C /usr/src fetch jlduran > From https://github.com/jlduran/freebsd-src > * [new branch] D37210 -> jlduran/D3721= 0 > =E2=80=A6 > * [new branch] nanobsd-embedded-use-makefs -> > jlduran/nanobsd-embedded-use-makefs > =E2=80=A6 > * [new branch] wip-fix-comment-blah -> > jlduran/wip-fix-comment-blah > % git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs > nanobsd-embedded-use-makefs > fatal: not a valid object name: 'nanobsd-embedded-use-makefs' > % > > If it's relevant: my /usr/src originated from my fork. I think you've got the operand order wrong. Try git -C /usr/src branch nanobsd-embedded-use-makefs jlduran/nanobsd-embedded-use-makefs From nobody Fri Sep 8 02:51:34 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhgcM5nPQz4sHRd for ; Fri, 8 Sep 2023 02:51:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhgcM2FdKz4SNJ for ; Fri, 8 Sep 2023 02:51:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-52c9f1bd05dso2165582a12.3 for ; Thu, 07 Sep 2023 19:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1694141506; x=1694746306; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UiGA/wM9pYdM8w50PMm+XmOMQUN8IfdUvnSUXDdHUCI=; b=avFu/MQD0f0lyaCxkYAOqlCjWURUdPLMUFBVJU7zIsQNZsjXQCruPgWH3ZkgSx4vUw FFCQq0V/i1JFHBHzw4U7lHmn4smvm2iJ/fbrVlHDN7/rR5AjAbYi0OOzGm8I7yP2uXQz nQx57oogtTFdafTSMlApji6nsdTCd671ALWzkW9YTFXgCLtu0SyC15+PVzrVuFEC2Rxh /N8veLLvYISRm7w0Pn7VoVszPZ80ZGIZDNM/s9APBm0deC46KFFLDvu+VIyV05dPGiN5 mAx4YEZMBi0qviJC9FFVKdi/xs+k/VjQw36bLT8aLi5Xb5cOGaDpgCLmt/uZTzx28TQx c1Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694141506; x=1694746306; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UiGA/wM9pYdM8w50PMm+XmOMQUN8IfdUvnSUXDdHUCI=; b=lHG6Z5QUv8hGp3cNR2+bzbDhZ9ipORyVYvLK1VcY5p3CUucsK4NdQQNdci+WoJaAyu QDt//ejN04vVS4kxJnNH2JPiEPzPU0TJJZ96nZPajLigYOzifPGpVbWHPnx42ZhcA0qG bboADBennwmrmRNlAmvBqvodwkgpPGIjcc2kbcFf0aF6WyqA0P3QAfcCjynm7bl+6ciT I9iP5yNu0VzIFoJO6sXm/h5bEhvMQcCx/EWlbtPfyeGUEKCZr9/5wPGm1dbvbUAwrFkL TKTR3pTH4gcVCiZGiq7/XPl5me3zVWktiZJNJr5mYsbejgwGAlo7vcYvmWUk8foBunJF kUzQ== X-Gm-Message-State: AOJu0YzThLShN9ETYdDvS74XtibNelIQStEROdBqAcZ/3nq89tIIadbG 5cn3owlcy+NlrlAwHtVRUMJbIKULa3N+T9W85juMNQ== X-Google-Smtp-Source: AGHT+IFq5Ktx4NUK3iJzl1TgeUjKTw+1yIx1PC0480or985aYI6GsUzMo555UZtQ20sg/ph5vMje045OptCZG7r6sZ4= X-Received: by 2002:aa7:d90b:0:b0:52a:841:bc56 with SMTP id a11-20020aa7d90b000000b0052a0841bc56mr780063edr.1.1694141505617; Thu, 07 Sep 2023 19:51:45 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> In-Reply-To: <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> From: Warner Losh Date: Thu, 7 Sep 2023 20:51:34 -0600 Message-ID: Subject: Re: Working with forks To: Graham Perrin Cc: Alan Somers , freebsd-git Content-Type: multipart/alternative; boundary="000000000000a45d8c0604d00ec1" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4RhgcM2FdKz4SNJ --000000000000a45d8c0604d00ec1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 7, 2023, 8:39 PM Graham Perrin wrote: > On 07/09/2023 20:03, Alan Somers wrote: > > On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin > wrote: > >> With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in > the FreeBSD project) as a starting point: when the times come to work, > locally, with other people's forks, does Git (at the command line) allow = an > easy way to temporarily use the same local directory? > > I do this all the time, if I understand the question correctly. You > > just need to add a separate git remote for each fork. For example, > > this sequence of commands will clone the FreeBSD source. Then it will > > fetch grahamperrin's fork. Then it will checkout a copy of > > grahamperrin's feature branch. Finally, it will rebase that feature > > branch onto a branch from the original FreeBSD repo. > > > > git clone git@github.com/freebsd/freebsd-src.git > > cd freebsd-src > > git remote add grahamperrin git@github.com/grahamperrin/freebsd-src.git > > git fetch grahamperrin > > git branch grahamperrin/featureX featureX > > git checkout featureX > > git rebase origin/stable/13 > > Thanks. > > Below (an abbreviated list of branches), what am I doing wrong? > > % git -C /usr/src config --get remote.origin.url > https://github.com/grahamperrin/freebsd-src.git > % git -C /usr/src remote add jlduran > https://github.com/jlduran/freebsd-src.git > % git -C /usr/src fetch jlduran > From https://github.com/jlduran/freebsd-src > * [new branch] D37210 -> jlduran/D3721= 0 > =E2=80=A6 > * [new branch] nanobsd-embedded-use-makefs -> > jlduran/nanobsd-embedded-use-makefs > =E2=80=A6 > * [new branch] wip-fix-comment-blah -> > jlduran/wip-fix-comment-blah > % git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs > nanobsd-embedded-use-makefs > fatal: not a valid object name: 'nanobsd-embedded-use-makefs' > % > > If it's relevant: my /usr/src originated from my fork. > I never use -C... but 'git checkout nanobsd-embedded-use-makefs' may work. Or 'git checkout -t jlduran/nanobsd-embedded-use-makefs' if not. The latter will definitely work. The git branch command never does what I want so I never use it (except for variants like -d or --sort). Warner > --000000000000a45d8c0604d00ec1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Sep 7, 2023, 8:39 PM Graham Perrin <grahamperrin@gmail.com> wrote:
On 07/09/2023 20:03, Alan Somers wrot= e:
> On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin <grahampe= rrin@gmail.com> wrote:
>> With a clone of e.g. https://github.co= m/freebsd/freebsd-src.git (in the FreeBSD project) as a starting point:= when the times come to work, locally, with other people's forks, does = Git (at the command line) allow an easy way to temporarily use the same loc= al directory?
> I do this all the time, if I understand the question correctly.=C2=A0 = You
> just need to add a separate git remote for each fork.=C2=A0 For exampl= e,
> this sequence of commands will clone the FreeBSD source.=C2=A0 Then it= will
> fetch grahamperrin's fork.=C2=A0 Then it will checkout a copy of > grahamperrin's feature branch.=C2=A0 Finally, it will rebase that = feature
> branch onto a branch from the original FreeBSD repo.
>
> git clone git@github.com/freebsd/freebs= d-src.git
> cd freebsd-src
> git remote add grahamperrin git@gi= thub.com/grahamperrin/freebsd-src.git
> git fetch grahamperrin
> git branch grahamperrin/featureX featureX
> git checkout featureX
> git rebase origin/stable/13

Thanks.

Below (an abbreviated list of branches), what am I doing wrong?

% git -C /usr/src config --get remote.origin.url
https://github.com/grahamperrin/freebsd-sr= c.git
% git -C /usr/src remote add jlduran
https://github.com/jlduran/freebsd-src.git<= br> % git -C /usr/src fetch jlduran
=C2=A0From https://github.com/jlduran/freebsd-src
=C2=A0=C2=A0* [new branch] D37210=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 -> jlduran/D37210
=E2=80=A6
=C2=A0=C2=A0* [new branch] nanobsd-embedded-use-makefs=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ->
jlduran/nanobsd-embedded-use-makefs
=E2=80=A6
=C2=A0=C2=A0* [new branch] wip-fix-comment-blah=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ->
jlduran/wip-fix-comment-blah
% git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs
nanobsd-embedded-use-makefs
fatal: not a valid object name: 'nanobsd-embedded-use-makefs'
%

If it's relevant: my /usr/src originated from my fork.
=



--000000000000a45d8c0604d00ec1-- From nobody Fri Sep 8 04:30:24 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhjpR4qJbz4sM8R for ; Fri, 8 Sep 2023 04:30:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhjpQ5Cb6z3QnQ for ; Fri, 8 Sep 2023 04:30:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=WQJw3zud; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::530) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-52a23227567so2250196a12.0 for ; Thu, 07 Sep 2023 21:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1694147436; x=1694752236; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uOQpZz6LDn7vTP8NSnWDFwms9VlhZDNIiZva/eoInHQ=; b=WQJw3zudlrfrZx9PYO2isnu7VJa6OEFsQlCgdEm6UnIp6qSM82vSmqguUvOBvhKvd7 WRXUB5LOGWmWvQXv/ynyKRfFkLWNVouYlWt8slOptF8g19nOlOaf4MJZzWOIcIB3uvk4 lIu/fEksdIYO4cU+MukDWFUlboUONefY/KaI3Y5835nqh2VTBZGoLTmLgmotsBRnihQG 4g3NGqh7QsilRAyoCG+Bkv4me8wmeukfZlv7dQlu1zgq7TBBrt1fToAiiKugRrSpgOiK WOJp/J7pm4gLagTS8ayxk83rkdC2nLrdqvoE857XYNr/cZI0JD+VjYxtagAmLwYrJZpm IrQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694147436; x=1694752236; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uOQpZz6LDn7vTP8NSnWDFwms9VlhZDNIiZva/eoInHQ=; b=OuX/cIMk6y4dJGTq/mtLwd7dxDHMAVxAzaxLFs+33nQStDCMw0t7CtIZ8RUTiFK6Sr Rv0ptnC0NbdKMH7eIYleC3qiLX2qgfht5MtSFYWJ057HG7xLU1xRKW5vDZeeDq+F9qei d81U8+Y922txLyleCYBNhavXPiqFMdHjCWZYLndYWdfhmPywyEKBPOm6xBPOyLQdqY8i VAVPf3E+2SyL2rt/GJaEorOs9kBH+PeuTDH3Hwl6maf8DDFSzDnrzLc8Nc/6giIZI0TY uGpiWdfRV4D1+oJ+kCJMveny1t8JRu9u8i1K1an4umL6TrFj6KUr06lutFGdYtC408sQ xSiQ== X-Gm-Message-State: AOJu0YzRxIOQmaw60cqS5wwaJfPN62bU2Tpg/uwK20+fIuv2ug7G6oK6 4hMzfMIfDovvOF93oXqkEs0/hrNleRMgy0au4ZmMPA== X-Google-Smtp-Source: AGHT+IHpjVIxuKB27tJ0cwe3iqBxWruNsxdlGFZgKIyJqNu6hcKu8q5wb02eA3YkT4d0nY+2P/nhFjAKh7CyjPr3wFE= X-Received: by 2002:a05:6402:7c4:b0:521:ae63:ee63 with SMTP id u4-20020a05640207c400b00521ae63ee63mr834080edy.16.1694147435873; Thu, 07 Sep 2023 21:30:35 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> In-Reply-To: From: Warner Losh Date: Thu, 7 Sep 2023 22:30:24 -0600 Message-ID: Subject: Re: Working with forks To: Graham Perrin Cc: Alan Somers , freebsd-git Content-Type: multipart/alternative; boundary="0000000000001cdbfb0604d17052" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::530:from]; TO_DN_ALL(0.00)[]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::530:server fail]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-Rspamd-Queue-Id: 4RhjpQ5Cb6z3QnQ --0000000000001cdbfb0604d17052 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 7, 2023 at 8:51=E2=80=AFPM Warner Losh wrote: > > > On Thu, Sep 7, 2023, 8:39 PM Graham Perrin wrote= : > >> On 07/09/2023 20:03, Alan Somers wrote: >> > On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin >> wrote: >> >> With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in >> the FreeBSD project) as a starting point: when the times come to work, >> locally, with other people's forks, does Git (at the command line) allow= an >> easy way to temporarily use the same local directory? >> > I do this all the time, if I understand the question correctly. You >> > just need to add a separate git remote for each fork. For example, >> > this sequence of commands will clone the FreeBSD source. Then it will >> > fetch grahamperrin's fork. Then it will checkout a copy of >> > grahamperrin's feature branch. Finally, it will rebase that feature >> > branch onto a branch from the original FreeBSD repo. >> > >> > git clone git@github.com/freebsd/freebsd-src.git >> > cd freebsd-src >> > git remote add grahamperrin git@github.com/grahamperrin/freebsd-src.gi= t >> > git fetch grahamperrin >> > git branch grahamperrin/featureX featureX >> > git checkout featureX >> > git rebase origin/stable/13 >> >> Thanks. >> >> Below (an abbreviated list of branches), what am I doing wrong? >> >> % git -C /usr/src config --get remote.origin.url >> https://github.com/grahamperrin/freebsd-src.git >> % git -C /usr/src remote add jlduran >> https://github.com/jlduran/freebsd-src.git >> % git -C /usr/src fetch jlduran >> From https://github.com/jlduran/freebsd-src >> * [new branch] D37210 -> jlduran/D372= 10 >> =E2=80=A6 >> * [new branch] nanobsd-embedded-use-makefs -> >> jlduran/nanobsd-embedded-use-makefs >> =E2=80=A6 >> * [new branch] wip-fix-comment-blah -> >> jlduran/wip-fix-comment-blah >> % git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs >> nanobsd-embedded-use-makefs >> fatal: not a valid object name: 'nanobsd-embedded-use-makefs' >> % >> >> If it's relevant: my /usr/src originated from my fork. >> > > > I never use -C... but 'git checkout nanobsd-embedded-use-makefs' may work= . > Or 'git checkout -t jlduran/nanobsd-embedded-use-makefs' if not. The latt= er > will definitely work. The git branch command never does what I want so I > never use it (except for variants like -d or --sort). > My typical work flow looks more like: % git remote add bruno httpsg:ithub.com/seanbruno/qemu-bsd-user.git % git fetch bruno % git checkout -t bruno/gerbils (to get the gerbils branch from bruno created as well, to track the remote, but this specific one is ancient history at this point). or sometimes % git worktree add ../qemu-bruno bruno/gerbils Warner --0000000000001cdbfb0604d17052 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=


On Thu, Sep 7, 2023, 8:39 PM Graham Perrin <grahamperrin@gmail.com>= wrote:
On 07/09= /2023 20:03, Alan Somers wrote:
> On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin <grahampe= rrin@gmail.com> wrote:
>> With a clone of e.g. https://github.co= m/freebsd/freebsd-src.git (in the FreeBSD project) as a starting point:= when the times come to work, locally, with other people's forks, does = Git (at the command line) allow an easy way to temporarily use the same loc= al directory?
> I do this all the time, if I understand the question correctly.=C2=A0 = You
> just need to add a separate git remote for each fork.=C2=A0 For exampl= e,
> this sequence of commands will clone the FreeBSD source.=C2=A0 Then it= will
> fetch grahamperrin's fork.=C2=A0 Then it will checkout a copy of > grahamperrin's feature branch.=C2=A0 Finally, it will rebase that = feature
> branch onto a branch from the original FreeBSD repo.
>
> git clone git@github.com/freebsd/freebs= d-src.git
> cd freebsd-src
> git remote add grahamperrin git@gi= thub.com/grahamperrin/freebsd-src.git
> git fetch grahamperrin
> git branch grahamperrin/featureX featureX
> git checkout featureX
> git rebase origin/stable/13

Thanks.

Below (an abbreviated list of branches), what am I doing wrong?

% git -C /usr/src config --get remote.origin.url
https://github.com/grahamperrin/freebsd-sr= c.git
% git -C /usr/src remote add jlduran
https://github.com/jlduran/freebsd-src.git<= br> % git -C /usr/src fetch jlduran
=C2=A0From https://github.com/jlduran/freebsd-src
=C2=A0=C2=A0* [new branch] D37210=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 -> jlduran/D37210
=E2=80=A6
=C2=A0=C2=A0* [new branch] nanobsd-embedded-use-makefs=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ->
jlduran/nanobsd-embedded-use-makefs
=E2=80=A6
=C2=A0=C2=A0* [new branch] wip-fix-comment-blah=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ->
jlduran/wip-fix-comment-blah
% git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs
nanobsd-embedded-use-makefs
fatal: not a valid object name: 'nanobsd-embedded-use-makefs'
%

If it's relevant: my /usr/src originated from my fork.
=




% git fetch bruno
% git checkout = -t bruno/gerbils
(to get the gerbils branch from bruno created as= well, to track the remote, but this
=C2=A0specific one is ancien= t history at this point).
or sometimes
% git worktree a= dd ../qemu-bruno bruno/gerbils

Warner
<= /div> --0000000000001cdbfb0604d17052-- From nobody Fri Sep 8 04:37:15 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhjyL5qQVz4sRHl for ; Fri, 8 Sep 2023 04:37:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhjyJ3VHFz3VWW for ; Fri, 8 Sep 2023 04:37:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b="eyBSe/hF"; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::535) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-52bcd4db4cbso2155159a12.1 for ; Thu, 07 Sep 2023 21:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1694147847; x=1694752647; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BRTQs4ogliyic0GVl543prEQWRHxUcI04RZfKaMIotQ=; b=eyBSe/hFcfoz/NEwZkEEJQkcZpWu7C/FLIY0eCc4IHHvPKcumN9NxEAbOz+ID+q9VP KBz1moH22kxzBgtRqBDDF2uDJFafHDy0RaVx/is+s3cWtnUdKqV61h2oCzSXRpTgPyAD yKuXLUbtuS+NOJlpc0ONs4R/FO21rd9WAkqfpkPhe7Toq9KRhh7LclWh+wXADcJxFAwC 3Pw5SrgG5R+12ZVri09VU6TykiPDLLp3QB8KysPDwT/1Ib9M9jy1iPQRgXdD7ETMtOKK UCG4Szfh+8kIg8AbA3dRSuwJBFvVamS2dvjJ/r1TIs6ogqM5PbAkR5iLnH2SSacdNqou UFDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694147847; x=1694752647; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BRTQs4ogliyic0GVl543prEQWRHxUcI04RZfKaMIotQ=; b=ZhcaV/73JvouLcaDdUWaCJsaA2GCHkLygbiRv/+3VmAsr+H/WHBTYfhRwZtTc47Tab Lpwpx0yk/ho8fxaHADcJlbJwPZ7s4tdPI8T2iBbUD5WtcxFfzxZ1auO20S/HlICN3CjR ltFxlzzbKDaHM9epNkJpCBtGzHidcur1cORjyg1p8vD077diZY4fmJ51YKLuGxiWOC/v NY5sleTBw8c9XXCjyeIVJ9B2yVPVmr5c8osmKbyTbnUINPKC1c9c+cwiLxa8d9lfF70g hg7LDHq2+2rt2PD57wdHiWXme4jtHMnCrFmyVx92MoiiAmuVWiAJn1YaoTd/erkFP8jd 6+8Q== X-Gm-Message-State: AOJu0YyBkQBMHA/KYc9APXLbRPAFgX2A7w3ni5qKWrC58SLR9wl0oa+C ROSWkdRb0pJs5BzDJ9WsmzYOT1i294OSmXGwUw9l3segw2V+5kYt+Ic= X-Google-Smtp-Source: AGHT+IF+mOFJ1YDAQxYiDAZi2/srKDBVP6h6Z4Q79uFhUJrKSBWBcNbMOiKW8kyN2ELOkg2lz/8iCFQRaDEhQ+DUXzY= X-Received: by 2002:a05:6402:14c1:b0:52c:9ce1:f117 with SMTP id f1-20020a05640214c100b0052c9ce1f117mr699427edx.40.1694147846797; Thu, 07 Sep 2023 21:37:26 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> In-Reply-To: From: Warner Losh Date: Thu, 7 Sep 2023 22:37:15 -0600 Message-ID: Subject: Re: Working with forks To: Graham Perrin Cc: Alan Somers , freebsd-git Content-Type: multipart/alternative; boundary="0000000000009b11cc0604d188fb" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.92 / 15.00]; URI_COUNT_ODD(1.00)[21]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; NEURAL_HAM_LONG(-0.93)[-0.927]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::535:from]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::535:server fail]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-Rspamd-Queue-Id: 4RhjyJ3VHFz3VWW --0000000000009b11cc0604d188fb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 7, 2023 at 10:30=E2=80=AFPM Warner Losh wrote: > > > On Thu, Sep 7, 2023 at 8:51=E2=80=AFPM Warner Losh wrote= : > >> >> >> On Thu, Sep 7, 2023, 8:39 PM Graham Perrin >> wrote: >> >>> On 07/09/2023 20:03, Alan Somers wrote: >>> > On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin >>> wrote: >>> >> With a clone of e.g. https://github.com/freebsd/freebsd-src.git (in >>> the FreeBSD project) as a starting point: when the times come to work, >>> locally, with other people's forks, does Git (at the command line) allo= w an >>> easy way to temporarily use the same local directory? >>> > I do this all the time, if I understand the question correctly. You >>> > just need to add a separate git remote for each fork. For example, >>> > this sequence of commands will clone the FreeBSD source. Then it wil= l >>> > fetch grahamperrin's fork. Then it will checkout a copy of >>> > grahamperrin's feature branch. Finally, it will rebase that feature >>> > branch onto a branch from the original FreeBSD repo. >>> > >>> > git clone git@github.com/freebsd/freebsd-src.git >>> > cd freebsd-src >>> > git remote add grahamperrin >>> git@github.com/grahamperrin/freebsd-src.git >>> > git fetch grahamperrin >>> > git branch grahamperrin/featureX featureX >>> > git checkout featureX >>> > git rebase origin/stable/13 >>> >>> Thanks. >>> >>> Below (an abbreviated list of branches), what am I doing wrong? >>> >>> % git -C /usr/src config --get remote.origin.url >>> https://github.com/grahamperrin/freebsd-src.git >>> % git -C /usr/src remote add jlduran >>> https://github.com/jlduran/freebsd-src.git >>> % git -C /usr/src fetch jlduran >>> From https://github.com/jlduran/freebsd-src >>> * [new branch] D37210 -> >>> jlduran/D37210 >>> =E2=80=A6 >>> * [new branch] nanobsd-embedded-use-makefs -> >>> jlduran/nanobsd-embedded-use-makefs >>> =E2=80=A6 >>> * [new branch] wip-fix-comment-blah -> >>> jlduran/wip-fix-comment-blah >>> % git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs >>> nanobsd-embedded-use-makefs >>> fatal: not a valid object name: 'nanobsd-embedded-use-makefs' >>> % >>> >>> If it's relevant: my /usr/src originated from my fork. >>> >> >> >> I never use -C... but 'git checkout nanobsd-embedded-use-makefs' may >> work. Or 'git checkout -t jlduran/nanobsd-embedded-use-makefs' if not. T= he >> latter will definitely work. The git branch command never does what I wa= nt >> so I never use it (except for variants like -d or --sort). >> > > My typical work flow looks more like: > > % git remote add bruno httpsg:ithub.com/seanbruno/qemu-bsd-user.git > % git fetch bruno > % git checkout -t bruno/gerbils > (to get the gerbils branch from bruno created as well, to track the > remote, but this > specific one is ancient history at this point). > or sometimes > % git worktree add ../qemu-bruno bruno/gerbils > Or in this case I just did: % git remote add jlduran ssh://git@github.com/jlduran/freebsd-src.git % git fetch jlduran % git checkout nanobsd-embedded-use-makefs and it created the tracking branch against jlduran/nanobsd-embedded-use-makefs for me. Other guides and people suggest adding the -t and using the upstream name to do it. I'm not sure what to recommend, but I know the above works. I also never have a /usr/src on any of my systems. Too many work trees for larger work in progress or review-in-progress projects. When I do have /usr/src, it's always exactly what's on the machine (or I'm building the new version). It got too confusing for me in the 90s having this in /usr/src (though to be fair, it was the era of CVS which made easy things hard, and hard things impossible). Warner --0000000000009b11cc0604d188fb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Sep 7, 2023 at 10:30=E2=80=AF= PM Warner Losh <imp@bsdimp.com>= wrote:


On Thu, Sep 7, 2023 at 8:51=E2=80=AFPM Warner= Losh <imp@bsdimp.co= m> wrote:


On Thu, Sep 7, 2023, 8:39 PM Graham Perrin <grahamperrin@gmail.co= m> wrote:
On 07/09/2023 20:03, Alan Somers wrote:
> On Thu, Sep 7, 2023 at 11:49=E2=80=AFAM Graham Perrin <grahampe= rrin@gmail.com> wrote:
>> With a clone of e.g. https://github.co= m/freebsd/freebsd-src.git (in the FreeBSD project) as a starting point:= when the times come to work, locally, with other people's forks, does = Git (at the command line) allow an easy way to temporarily use the same loc= al directory?
> I do this all the time, if I understand the question correctly.=C2=A0 = You
> just need to add a separate git remote for each fork.=C2=A0 For exampl= e,
> this sequence of commands will clone the FreeBSD source.=C2=A0 Then it= will
> fetch grahamperrin's fork.=C2=A0 Then it will checkout a copy of > grahamperrin's feature branch.=C2=A0 Finally, it will rebase that = feature
> branch onto a branch from the original FreeBSD repo.
>
> git clone git@github.com/freebsd/freebs= d-src.git
> cd freebsd-src
> git remote add grahamperrin git@gi= thub.com/grahamperrin/freebsd-src.git
> git fetch grahamperrin
> git branch grahamperrin/featureX featureX
> git checkout featureX
> git rebase origin/stable/13

Thanks.

Below (an abbreviated list of branches), what am I doing wrong?

% git -C /usr/src config --get remote.origin.url
https://github.com/grahamperrin/freebsd-sr= c.git
% git -C /usr/src remote add jlduran
https://github.com/jlduran/freebsd-src.git<= br> % git -C /usr/src fetch jlduran
=C2=A0From https://github.com/jlduran/freebsd-src
=C2=A0=C2=A0* [new branch] D37210=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 -> jlduran/D37210
=E2=80=A6
=C2=A0=C2=A0* [new branch] nanobsd-embedded-use-makefs=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ->
jlduran/nanobsd-embedded-use-makefs
=E2=80=A6
=C2=A0=C2=A0* [new branch] wip-fix-comment-blah=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ->
jlduran/wip-fix-comment-blah
% git -C /usr/src branch jlduran/nanobsd-embedded-use-makefs
nanobsd-embedded-use-makefs
fatal: not a valid object name: 'nanobsd-embedded-use-makefs'
%

If it's relevant: my /usr/src originated from my fork.
=




% git fetch bruno
% git checkout -t bruno/gerbils
(to get the gerbils branch fro= m bruno created as well, to track the remote, but this
=C2=A0spec= ific one is ancient history at this point).
or sometimes
% git worktree add ../qemu-bruno bruno/gerbils

Or in this case I just did:

%=C2=A0git remote add jlduran ssh://git@github.com/jlduran/freebsd-src.git
%= git fetch jlduran
% git checkout nanobsd-embedded-use-makefs

and it created the tracking branch against jlduran/na= nobsd-embedded-use-makefs=C2=A0for me.
Other guides and people su= ggest adding the -t=C2=A0 and using the upstream name to do it.
I= 'm not sure what to recommend, but I know the above works.
I also never have a /usr/src on any of my systems. Too many wo= rk trees for larger
work in progress or review-in-progress projec= ts. When I do have /usr/src, it's always
exactly what's o= n the machine (or I'm building the new version). It got too confusing
for me in the 90s having this in /usr/src (though to be fair, it w= as the era of CVS which
made easy things hard, and hard things im= possible).

Warner
--0000000000009b11cc0604d188fb-- From nobody Sat Sep 9 17:34:25 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rjg8R04MLz4sQHq for ; Sat, 9 Sep 2023 17:34:31 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rjg8Q09ZRz3ZtW for ; Sat, 9 Sep 2023 17:34:30 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=qANX5ZMz; spf=pass (mx1.freebsd.org: domain of grahamperrin@gmail.com designates 2a00:1450:4864:20::234 as permitted sender) smtp.mailfrom=grahamperrin@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ba1e9b1fa9so52901751fa.3 for ; Sat, 09 Sep 2023 10:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694280868; x=1694885668; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=cfdSN1O3h140e8E4yHFtJf9VpK/sj0AN+mdigZ4JQww=; b=qANX5ZMzJF/xJn9eA7cgDcxpea5myqaxqoCjx2MsStaBzOXXlckvwi5u8F1VUPEHfj ieyLdRahukTVY1SB9d4ry4mwr2CWWUeUvG1YTrO0+W7Ia3LwiDmwf/CATgx8cg8MlyVz CNLeUZgYnBg+ePGu7xOqZKsbYdw9AFzgV0fk6EYQwGAVt3oJLrYsMk+KG7M897DdKCpe HgZmUkDwOXQ1GIj7szUk1I8ZPL4a9J9CD8QOhmncvjebdtuAQLJd/Yz2FQiDs/jQUI5p o5ZhlndKjKHh9e6aOH0oZxZMZ8Hc10nnJQXBWRzqxhrSuWV9YRoSf4Tu9DZVQp1m6EwL Y4Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694280868; x=1694885668; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cfdSN1O3h140e8E4yHFtJf9VpK/sj0AN+mdigZ4JQww=; b=uusr7NVYjfNiZzlRza0au0VZqCJyeXNPKCW4PKs0r3ZYZPx+7WGEy3kwUGNQNkBEvl fwDCF9mazG463KErlrncrzyRbWeDgSaw9W0QudpFslQUjwYJD20DGymeBIMcUoRy0B/i RLUmbVpSSM5vHQWC72iX9VWN328G5k6X0sXZq1Dcq9470o9/mNXj79aW1twGMOm8V6lZ GWCzsyvsR0wgrlXp1fWDPZ2yLu/Zb5dormvKHZ4MF5XXDhdkPqmX4ZXACynuwddhZ79t 5MxUt9JUGnla1cplXZTD3rYgXyrDjI2F5VyKFdF6waZvR9iFrL9tYX6AM98lo7v3GIZb kliA== X-Gm-Message-State: AOJu0YzAutFzEYno46A9r0PFF+ekwbkJMOb3DWWddXWLS6e1X4EqIJ8Q m3584PCRL0u4xZoFWU9qhGWzQDtX/AglqQ== X-Google-Smtp-Source: AGHT+IE4QnXRCWFSxSzCI2V9EbtitHZM1oyuXSgHCoQy4W363SEBLeeSW41FHxGaQhz35YOo7SkhbQ== X-Received: by 2002:a2e:8099:0:b0:2b6:d6e1:a191 with SMTP id i25-20020a2e8099000000b002b6d6e1a191mr4249200ljg.23.1694280867565; Sat, 09 Sep 2023 10:34:27 -0700 (PDT) Received: from ?IPV6:2001:470:1f1c:a0::2? (tunnel642390-pt.tunnel.tserv1.lon2.ipv6.he.net. [2001:470:1f1c:a0::2]) by smtp.gmail.com with ESMTPSA id a7-20020a1709062b0700b009a1dbf55665sm2584754ejg.161.2023.09.09.10.34.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Sep 2023 10:34:26 -0700 (PDT) Message-ID: Date: Sat, 9 Sep 2023 18:34:25 +0100 List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: Warner Losh Cc: freebsd-git References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> From: Graham Perrin Subject: Re: Working with forks In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; FREEFALL_USER(0.00)[grahamperrin]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::234:from]; BLOCKLISTDE_FAIL(0.00)[2001:470:1f1c:a0::2:server fail,2a00:1450:4864:20::234:server fail]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Rjg8Q09ZRz3ZtW On 08/09/2023 05:37, Warner Losh wrote: > … I also never have a /usr/src on any of my systems. … I learnt to restrict myself to /usr/doc, /usr/ports, and /usr/src after long ago confusion about where things normally reside. The 'git -C' habit sort of forces me to think twice about which tree I am (or should be) working with before entering any command. From nobody Sat Sep 9 17:39:01 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RjgFk5RM2z4sSdq for ; Sat, 9 Sep 2023 17:39:06 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RjgFj1NMbz3bhH for ; Sat, 9 Sep 2023 17:39:05 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=QsSKTB00; spf=pass (mx1.freebsd.org: domain of grahamperrin@gmail.com designates 2a00:1450:4864:20::530 as permitted sender) smtp.mailfrom=grahamperrin@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-522dd6b6438so3814685a12.0 for ; Sat, 09 Sep 2023 10:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694281143; x=1694885943; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:cc:subject:from:references:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=5B9Sd3yZsO0bKswLmbpSeRdgFecP+IMOdlyEd8llBaw=; b=QsSKTB00/Way5i65mHZR63972IFlDrANvmz+0pruD3oMr2lukB78uCqN+ZQf9jdQoc oFfjDR4STBVJBfPoyCst8E9R1zEYQItY0N/lvjEXtMpmYXjrfaq63a0UdEt7nmJPZG0o ky0+YKyGt5hvLerc5OVAIWCRQuqHGZDZqEvI5FNWtzp3gAAwp/mq4Icd10HOty6d2M3d tpnUq+8A1m2NrEb+Uf9PJcxHyuzMgLQzu0n25az4WaY1GZvH0JOgHaF5FgRsMLQj2nd2 tWov1KT/UzKXjzamWCU2cpnhujhTi8Vp/1rDTywLBkxAZLGUOpQc/7Z3rGs6d11gPTjz HURg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694281143; x=1694885943; h=content-transfer-encoding:in-reply-to:cc:subject:from:references:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5B9Sd3yZsO0bKswLmbpSeRdgFecP+IMOdlyEd8llBaw=; b=SRRF19edKlpNXwHQHPOYTinL0zF7bH3nAcCGBdktw+VQB02il46rt5XgWinNtrOBbv 8ybR7QGUkmyUCWoQ9qI+v8MKkZDCIS356j8xNZH74ZRee7WjKIL1uFO7sXa6qoqoJrwT /JGz3wgVGFEQN1GHl66EnnkgBdSY2g4xFWtenAD4qieQMttwwSMdb3/TLRlSqtTxqN6Q 6Y2hCD8e4Q3IY6TFDzflzvfvsflR1SIIrsa85lYCbWwE+YiWjxKzK456QOTP5JmnX7Be mbaioTuecnNMaA/nF079Wsj0O4HIi963xjG2fBSwbyZIX91GLSZs6wB+PJVdTQRWE8+M fIUw== X-Gm-Message-State: AOJu0YyaQHEkbyG4jxnfEiKgPjVxwL2/KDkr6uxSXQQjKiKpgkz91mo2 l+Dc2L4Co5sKLCvQez+FoR3HWEtBFpLULg== X-Google-Smtp-Source: AGHT+IEG7Ulf6x//PcNMBCc35hPV7sR7DCPITAl0D2BtQ5sOPgEhTNMzCl17cfsFv5JwFpqPY0Q8Cw== X-Received: by 2002:aa7:ca52:0:b0:52a:66c0:1e9b with SMTP id j18-20020aa7ca52000000b0052a66c01e9bmr4416417edt.30.1694281143288; Sat, 09 Sep 2023 10:39:03 -0700 (PDT) Received: from ?IPV6:2001:470:1f1c:a0::2? (tunnel642390-pt.tunnel.tserv1.lon2.ipv6.he.net. [2001:470:1f1c:a0::2]) by smtp.gmail.com with ESMTPSA id n28-20020a056402515c00b0052a198d8a4dsm2393759edd.52.2023.09.09.10.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Sep 2023 10:39:02 -0700 (PDT) Message-ID: <7e72f94c-dc87-0244-cd2c-59371ab4bf2d@gmail.com> Date: Sat, 9 Sep 2023 18:39:01 +0100 List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: Warner Losh References: <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> From: Graham Perrin Subject: Re: Working with forks Cc: freebsd-git In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::530:from]; FREEFALL_USER(0.00)[grahamperrin]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; BLOCKLISTDE_FAIL(0.00)[2001:470:1f1c:a0::2:server fail,2a00:1450:4864:20::530:server fail]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4RjgFj1NMbz3bhH On 08/09/2023 05:37, Warner Losh wrote: > … > > Or in this case I just did: > > % git remote add jlduran ssh://git@github.com/jlduran/freebsd-src.git > > % git fetch jlduran > % git checkout nanobsd-embedded-use-makefs OK, that makes sense in the context of , >> … exist a tracking branch in exactly one remote … with a matching name … >> Then , I can see the name of the fork: git -C /usr/src branch -vv Nowadays, when creating a branch in GitHub I get the hint to have the name of my fork as the prefix- to the name. I don't know whether this is a native feature, or thanks to refined-github. Thanks for the condensed examples. Very helpful. (Sorry for abusing freebsd-git with questions that are not FreeBSD-specific. Experiences in Git-specific areas haven't been good, for me.)