Ussing git To Get FreeBSD Source Code

Recently, FreeBSD has switched from svn to git as the method to get source code. Those unfamiliar with git, including myself, have been unsure of the syntax. Thanks to Warner Losh's git primer, and help from FreeBSD forums users, Jose, jb_fvwm2, vigole, SirDice, and probably some others whom I've overlooked, and, I hope, will accept my thanks and apologies, I've figured out syntax that works. At time of writing, January, 2021, the present release is 12.2-RELEASE. To get the present release--though it's 12.2 now, by the time the reader sees this, it may be 12.3 or something else--the following works. We are assuming you are in the /usr directory and that in that /usr directory you have a /src directory, so, just as with svn, it would wind up in /usr/src.
git clone -b releng/12.2 --depth 1 https://git.freebsd.org/src.git src

If you were following 12 stable, right now, (January, 2021) the following would get you 12.2-STABLE. When 12.3 is available, you would get that. In other words, it will bring you the latest available version of 12.x-STABLE
git clone -b stable/12 --depth 1 https://git.freebsd.org/src.git src

To get an earlier release of the 12.x branch, say, 12.1, you can use
git clone -b releng/12.1 --depth 1 https://git.freebsd.org/src.git src

To get CURRENT one uses
git clone https://git.freebsd.org/src.git src

To update source that you've pulled (like doing svn up)
cd /usr/src
git pull

FreeBSD-13.x is released a beta version in February. For that one (and for further 13.0 releases, the command is
git clone -b releng/13.0 https://git.freebsd.org/src.git src

Again, this information was given me by others. I'm just putting up this page to have a convenient place to point people when the question is asked on forums, as well as making it easier for me to find.

Ports will also be converted to git. When that syntax is clear to me, I'll add it here.