Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2020 15:47:10 -0500
From:      "Brandon Bergren" <bdragon@FreeBSD.org>
To:        freebsd-git@freebsd.org
Subject:   Re: Question on (my) workflow migration svn -> git
Message-ID:  <5d228d35-5990-4644-892e-6f2da81f6b05@www.fastmail.com>
In-Reply-To: <CAJ9axoR=0zPxUSF-wH-ZT%2BeeHN3-ZB%2B=M6NcbWR1zKncU2m%2BKA@mail.gmail.com>
References:  <20200924201715.GR1390@albert.catwhisker.org> <20200924205326.GB64154@spindle.one-eyed-alien.net> <CAJ9axoR=0zPxUSF-wH-ZT%2BeeHN3-ZB%2B=M6NcbWR1zKncU2m%2BKA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, Sep 25, 2020, at 12:23 PM, Ulrich Sp=C3=B6rlein wrote:
> Why not a bare repo same as with the svnsync copies before?
>=20
> On each machine (doesn't matter if connected or not) he could:
>=20
> git clone --bare https://.../{src,ports}
>=20
> and "git fetch --all --prune" (or some combination) whenever internet
> connectivity exists. Then it's easy enough to clone from that local
> copy for the various branches, but it's obviously suboptimal. I
> recommend to read `man git-worktree`. From those bare repos, he could
> check out both stable/12 and head to some arbitrary location and keep
> them updated with ... um git pull I believe.
>=20
> so for svn switch, look at a bare clone + multiple worktrees (if you
> need just a single worktree, then don't do the bare repo, obviously).
>=20
> I also assume that your combination of svnsync + rsync was only due to=

> speed, yes? You can ignore all that and always pull directly from the
> cgit.freebsd.org host or whatever the final URL will be. The savings
> in bandwidth are not worth it to do something else, but you can of
> course `git remote add ...` on your laptop and fetch first from the
> local clone and then from the internet.
>=20
> In short, the svnsync crutch is no longer needed, git can do that all
> natively and will be so much faster doing it, to boot. But, you'll
> need to read up on clones, fetches, bare repos, worktrees and other
> stuff.

And actually, you can pull from or push to a *regular* clone as well, as=
 long as you are pushing to branches other than the currently-checked ou=
t branch. (Git will prevent you from pushing to the checked-out branch t=
o prevent the working copy from getting desynced.)

--=20
  Brandon Bergren
  bdragon@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5d228d35-5990-4644-892e-6f2da81f6b05>