Configuration Highlights

An outline of what Omarchy configures during installation.
This section covers Git defaults and identity, showcasing how Omarchy applies sensible Git settings and user information.

Index


Overview

Omarchy applies a curated set of Git defaults to streamline daily workflows. It sets common aliases, enforces a rebase-on-pull policy, defines a default branch name, and injects the user’s identity if provided.


Git Aliases

Omarchy creates shorthand commands to speed up Git usage.

Alias Expands To Purpose
co checkout Switch branches or restore files
br branch List, create, or delete branches
ci commit Record changes
st status Show working tree status

These aliases reduce keystrokes and align with popular Git workflows .


Git Configuration Settings

Beyond aliases, Omarchy adjusts core Git behaviors for consistency.

Setting Value Purpose
pull.rebase true Rebase commits on pull by default
init.defaultBranch master Use “master” as the initial branch name

This ensures newly cloned repositories default to a rebase strategy and a predictable first branch .


User Identity Configuration

If the installer detects user-provided identity variables, it configures Git globally:

Environment Variable Effect
OMARCHY_USER_NAME Sets git config --global user.name
OMARCHY_USER_EMAIL Sets git config --global user.email
  • Omarchy checks for non-empty values before applying.
  • This embeds your name and email in future commits.

Integration in Install Flow

  1. Installation script sources all config modules, including Git setup.
  2. Omarchy invokes the Git configuration script as part of its “preflight” checks and system setup.
  3. Your identity variables must be exported or prompted before this step.
# From install/config/config.sh
source $OMARCHY_INSTALL/config/git.sh

This sourcing happens in the main configuration sequence .


Code Reference

Below is the complete install/config/git.sh script that implements these settings:

#!/bin/bash

# Set common git aliases
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

# Enforce rebase on pull
git config --global pull.rebase true

# Define default branch name
git config --global init.defaultBranch master

# Set user identity if provided
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
  git config --global user.name "$OMARCHY_USER_NAME"
fi

if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
  git config --global user.email "$OMARCHY_USER_EMAIL"
fi

This script ensures Git is ready-to-use with sensible defaults and personalized identity out of the box.