Greg's living with git
Greg's diary
Greg's home page
HOWTO index
Google
http://dunham.org/grog/wip/wip.png
Work in progress

This page is mainly for my own use to come to terms with git, a program that terrifies me. This page is not so much a HOWTO as a way to help me through getting the bloody thing to work. It's based on the instructions in the FreeBSD Committer's Guide, themselves incomplete. Some of the steps relate only to FreeBSD developers. There's also another primer, but I think it's no longer maintained.

Initial setup

The instructions here seem out of sequence, but since I don't really understand them, I'll stick to the sequence.

  1. First locate the repository. There are several, all (I think) described in this page and referred to in the primer as “$URL” after a certain point. Currently we have:
     src   ssh://git@gitrepo.FreeBSD.org/src.git
     doc   ssh://git@gitrepo.FreeBSD.org/doc.git
     ports ssh://git@gitrepo.FreeBSD.org/ports.git
  2. Clone the initial tree:
    git clone -o freebsd --config remote.freebsd.fetch='+refs/notes/*:refs/notes/*' https://git.freebsd.org/${repo}.git

    I have no idea what half of these things mean, but it's important to note that, for src at any rate, it creates a subdirectory (in this case src) and checks out into that, so this operation should normally be performed in the directory /usr.

  3. XXX
    === groggyhimself@freefall (/dev/pts/8) ~ 1 -> gen-gitconfig.sh
    Use following commands in your newly cloned FreeBSD repository
    to ensure the committer name and email match FreeBSD.org data:

    ----
    git config user.name "Greg Lehey"
    git config user.email groggyhimself@FreeBSD.org
    ---

    Notes:
    - Your name needs to be exactly matched and the "FreeBSD.org"
      part in the email is case sensitive because we want your
      contribution history not to be counted separately, and
      work nicely with others' repository analyzers.

    - You can use `git config --global` to set it globally in
      your ~/.gitconfig
    === groggyhimself@freefall (/dev/pts/8) ~ 2 ->

MFC

=== root@tiwi (/dev/pts/0) /usr/src 229 -> git cherry-pick -x 31e076d70b5f --edit
Auto-merging sys/dev/usb/usbdevs
hint: Waiting for your editor to close the file... Waiting for Emacs...
[stable/13 d45fa9f42406] Add devices and quirks for some Olympus cameras.
 Date: Wed Mar 23 12:40:28 2022 +1100
 2 files changed, 48 insertions(+), 1 deletion(-)
=== root@tiwi (/dev/pts/0) /usr/src 230 -> git push
The authenticity of host 'gitrepo.freebsd.org (96.47.72.44)' can't be established.
ED25519 key fingerprint is SHA256:lNR6i4BEOaaUhmDHBA1WJsO7H3KtvjE2r5q4sOxtIWo.
Matching host key fingerprint found in DNS.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'gitrepo.freebsd.org' (ED25519) to the list of known hosts.
agent key RSA SHA256:S7sZHLcY4dgw53/rF70vrScdPuGef3enHdJzuYA1WDo returned incorrect signature type
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 4 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.37 KiB | 117.00 KiB/s, done.
Total 8 (delta 6), reused 1 (delta 0), pack-reused 0
To gitrepo.freebsd.org:src.git
   7472cae2e098..d45fa9f42406  stable/13 -> stable/13
=== root@tiwi (/dev/pts/0) /usr/src 231 -> git cherry-pick -x 31e076d70b5f --edit

Greg's home page Greg's diary Greg's photos Copyright

Valid XHTML 1.0!

$Id: git.php,v 1.1 2021/07/29 04:59:59 grog Exp grog $