Date: Wed, 6 Jan 2021 21:11:41 +0000 From: Steve O'Hara-Smith <steve@sohara.org> To: freebsd-questions@freebsd.org Subject: Re: Moving from svn to git for downloading source Message-ID: <20210106211141.6cd490e3dd88296280504e96@sohara.org> In-Reply-To: <X/YZPCM8/gDdecSz@rancor.immure.com> References: <X/YZPCM8/gDdecSz@rancor.immure.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 6 Jan 2021 14:10:36 -0600 Bob Willcox <bob@immure.com> wrote: > Please excuse my rather late joining of the party and asking a question > that has likely been answered (I've been sick and quite out of touch > lately), but what is the proper/best way to download the freebsd source > if you have been using svn for many years? Is there some quivalent > command to 'svn co ...'? Almost but not quite see: https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md The TL;DR goes like this: * git is a distributed VCS so you download (clone) a copy of the repository ** git clone -o freebsd https://git.freebsd.org/src.git Gets you a subdirectory src with the repo in src/.git and the main branch checked out in src/ * When you clone a repository you get the default branch checked out and all the history so branch switches, diffs and the like happen locally which is nice * You can choose to only download one branch and/or limited history * After you have cloned a repository you pull updates from the upstream repository with git pull --ff-only * Good practice is to create local branches for your own work and keep your copies of the remote branches pristine. Branching in git is *very* cheap. -- Steve O'Hara-Smith <steve@sohara.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210106211141.6cd490e3dd88296280504e96>