Tooling Guides

Version Control Guides

Version Control Guides

Git Client Guide

git-scm.com documentation git/git

Installation

sudo apt install git git-lfs

Initial Client Setup

documentation

git config --global user.name "[NAME]"
git config --global user.email "[EMAIL]"
git config --global init.defaultBranch "main"
git config --global core.excludesFile "~/.gitignore"
git lfs install
tee "$HOME/.gitignore" >/dev/null <<'EOF'
.idea
.vscode
EOF
Version Control Guides

Git Repository Guide

git-scm.com documentation

Exclude Files from Version Tracking

documentation

# SPDX-License-Identifier: 0BSD
# SPDX-FileCopyrightText: none

*.backup
*.bak
*.key
*.local
*.log
*.pem
*.sqlite*
*.swp
*.tmp
*~

Keep Git Hooks in Project

documentation

Git Hooks Initialization Recipe

Just
# SPDX-License-Identifier: 0BSD
# SPDX-FileCopyrightText: none
#
# Manage the Git hooks living in this repository.

# Run the recipes at the project root, not at the `.just` directory.
set working-directory := '..'

GITHOOKS := ".githooks"

# Configure Git to use the local `.githooks` directory.
init:
    git config --local core.hooksPath "{{ GITHOOKS }}"
# Manage the Git hooks living in this repository.
[group('githooks')]
mod githooks '.just/githooks.just'
Make
# SPDX-License-Identifier: 0BSD
# SPDX-FileCopyrightText: none
#
# Manage the Git hooks living in this repository.

GITHOOKS := .githooks

.PHONY: githooks
githooks:
	git config --local core.hooksPath "$(GITHOOKS)"
include .githooks/githooks.mk
Version Control Guides

Commitizen Guide

commitizen-tools.github.io documentation commitizen-tools/commitizen

Installation

pipx install commitizen

Auto-Check Commits via Git Hooks

documentation

#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 Tomáš Havlas <tomas@havlas.me>
#
# Enforce the Conventional Commits format with Commitizen.

set -euo pipefail

if ! command -v cz >/dev/null 2>&1; then
  echo "no cz, try running 'pipx install commitizen'"
  exit 127
fi

git cz check --allow-abort --commit-msg-file "$1"

EditorConfig Guide

editorconfig.org editorconfig/editorconfig

General Code Style

# SPDX-License-Identifier: 0BSD
# SPDX-FileCopyrightText: none

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[*.md]
# Trailing whitespace is significant in Markdown.
trim_trailing_whitespace = false

[{*.toml,*.ini}]
indent_size = 4
indent_style = space

[{*.yml,*.yaml,*.json}]
indent_size = 2
indent_style = space

[{Makefile,*.mk}]
# Make requires tabs to indent recipes.
indent_size = 4
indent_style = tab

Justfile Guide

just.systems documentation casey/just

Installation

curl --proto '=https' --tlsv1.2 -sSf "https://just.systems/install.sh" | sudo bash -s -- --to "/usr/local/bin"

Usage

Show Help Recipe

# SPDX-License-Identifier: 0BSD
# SPDX-FileCopyrightText: none
#
# Default the `just` invocation to an overview of the available recipes.

# Show this help message.
[default]
help:
    @just --unsorted --list --list-submodules
import '.just/help.just'