Moving from svn to git for downloading source
Steve O'Hara-Smith
steve at sohara.org
Wed Jan 6 21:11:49 UTC 2021
On Wed, 6 Jan 2021 14:10:36 -0600
Bob Willcox <bob at 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 at sohara.org>
More information about the freebsd-questions
mailing list