Re: Working with forks

From: Alan Somers <asomers_at_freebsd.org>
Date: Thu, 07 Sep 2023 19:03:23 UTC
On Thu, Sep 7, 2023 at 11:49 AM Graham Perrin <grahamperrin@gmail.com> 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