Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**

Switching to git for /usr/src

Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory:

cp -pRP /usr/src /usr/src-last_svn_update

Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.

rm -rf /usr/src 

mkdir /usr/src

Or just delete the /usr/src directory contents:

rm -rf /usr/src/*

Now obtain source

git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src

Source for a specific branch (depth implies single-branch)

git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src

Update -- the first line is needed for the initial update, just the pull thereafter.

git config pull.rebase true

git pull

FYI Sept 2021 github change.

Adjust url from git:// to https://

edit .git/config

under [origin] modify the url

from:

url = git://github.com/freebsd/freebsd.git

to:

url = https://github.com/freebsd/freebsd.git

No comments:

Post a Comment

Thank you for your interest!

Frequently viewed this week