For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/tools/devtools/git/index.md.

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

Updates

Git comes from the distribution’s packages, so it moves with the operating system updates the workstation applies.

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 skipped.
  • Access to private repositories is set up outside the devtool. Use HTTPS git with credential injection, as Injected credentials shows. It adds the credential outside the workstation. A sources[].git.credentialRef hands its token or deploy key to the workstation for the clone it makes. An SSHKey lets every program in the workstation sign with your local key while it is forwarded.
  • Works on Debian, Ubuntu, and Alpine.