Contributing to FreeBSD Development
Method Overview
git pull # Pull remote updates on the current branch
git checkout B # Switch to branch B
git diff -U999999 origin/main > 2023-1-24.diff # Generate the diff between the current branch and the remote main branch, output to 2023-1-24.diffComplete git Commit Example
root@generic:~ # git clone https://github.com/freebsd/freebsd-ports # Clone the freebsd-ports repository locally
Cloning into 'freebsd-ports'...
remote: Enumerating objects: 6264931, done.
remote: Counting objects: 100% (15563/15563), done.
remote: Compressing objects: 100% (9249/9249), done.
remote: Total 6264931 (delta 6507), reused 14986 (delta 6260), pack-reused 6249368 (from 1)
Receiving objects: 100% (6264931/6264931), 2.12 GiB | 10.73 MiB/s, done.
Resolving deltas: 100% (3615966/3615966), done.
Checking objects: 100% (16777216/16777216), done.
Updating files: 100% (161546/161546), done.
root@generic:~ # cd freebsd-ports/
root@generic:~/freebsd-ports # git branch -a # View branches
* main
remotes/origin/HEAD -> origin/main
remotes/origin/main
remotes/origin/rpi-firmware
root@generic:~/freebsd-ports # git checkout rpi-firmware # Switch to the rpi-firmware branch (created via GitHub web interface)
branch 'rpi-firmware' set up to track 'origin/rpi-firmware'.
Switched to a new branch 'rpi-firmware'
root@generic:~/freebsd-ports # git diff -U999999 origin/main > 2024.diff # Generate the diff with the remote main branch, output to 2024.diff
root@generic:~/freebsd-ports # ls -l 2024.diff
-rw-r--r-- 1 root wheel 18021 Oct 6 03:59 2024.diffAppendix: Some Potentially Useful Commands
How to Develop a Port
References
Generating BSD libc Library Documentation Using a Script
References
Exercises
Last updated