git

git itself — the install companion to the git tool configuration.

Installs git from the distribution’s package manager.

devtools:
  - name: git

The version field is not used by this recipe.

This is a thin recipe — packages: [git] does the same install. It exists so that a config layer can carry both halves of “a workstation with a working git” in one place:

devtools:
  - name: git                 # install it
toolconfigs:
  - name: git                 # give it an identity
    config:
      userName: Ada Lovelace
      userEmail: ada@example.com

Example

A portable identity layer: attach it by label to any workstation you own, and every one of them gets your git author identity with no git config --global inside the VM.

apiVersion: workstations.ringleader.dev/v1
kind: WorkstationConfig
metadata:
  name: my-git-identity
  namespace: local
spec:
  selector:
    matchLabels:
      owner: ada
  priority: 200
  devtools:
    - name: git
  toolconfigs:
    - id: git
      name: git
      config:
        userName: Ada Lovelace
        userEmail: ada@example.com
        settings:
          init.defaultBranch: main
          pull.rebase: "true"

See the git toolconfig for the full configuration surface.

Notes

  • Safe to re-run: a workstation that already has git — from packages, from the base image, or from an earlier setup run — is a fast no-op.
  • Cloning private repositories is a sources concern, not a devtool one. Use a credentialRef, or forward your local key with an SSHKey.
  • Works on Debian, Ubuntu, and Alpine.