From nobody Fri Sep 08 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.