cd /usr/src && git clone … https://git.freebsd.org/doc.git … (was: converting docs to git)

Graham Perrin grahamperrin at gmail.com
Fri Jan 1 21:47:10 UTC 2021


On 01/01/2021 21:00, CerebrosuS wrote:

> Hello,
>
> git clone https://github.com/freebsd/freebsd-doc.git
>
> Maybe?
>
> Am 01.01.21 um 21:47 schrieb Robert Huff:
>> Hello:
>>     Does anyone here know the correct invocation for the initial
>> download of the doc source tree using git?  I found an example that
>> seems to have worked for src, but not for doc.  This will be a
>> read-only copy. …


Taking a hint from the foot of <https://cgit.freebsd.org/doc/>, here's mine:

cd /usr/src && git clone --depth 1 https://git.freebsd.org/doc.git doc

Subsequent updates:

git -C /usr/src/doc pull --ff-only

Example
=======

root at mowa219-gjp4-8570p:~ # cd /usr/src && git clone --depth 1 
https://git.freebsd.org/doc.git doc
Cloning into 'doc'...
remote: Enumerating objects: 13158, done.
remote: Counting objects: 100% (13158/13158), done.
remote: Compressing objects: 100% (10824/10824), done.
remote: Total 13158 (delta 4045), reused 8506 (delta 1966), pack-reused 0
Receiving objects: 100% (13158/13158), 87.20 MiB | 868.00 KiB/s, done.
Resolving deltas: 100% (4045/4045), done.
Updating files: 100% (11379/11379), done.
root at mowa219-gjp4-8570p:/usr/src # ls -hl
total 17
drwxr-xr-x  23 root  wheel    27B Jan  1 21:42 doc
drwxr-xr-x  26 root  wheel    44B Dec 31 17:36 freebsd-current
root at mowa219-gjp4-8570p:/usr/src # cd
root at mowa219-gjp4-8570p:~ # git -C /usr/src/doc pull --ff-only
Already up to date.
root at mowa219-gjp4-8570p:~ #

----

YMMV


More information about the freebsd-questions mailing list