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