LinuxCommandLibrary

yadm-gitconfig

Manage Git configuration within yadm managed dotfiles

TLDR

Update or set a Git configuration value

$ yadm gitconfig [key.inner-key] [value]
copy

Get a value from yadm's Git configuration
$ yadm gitconfig --get [key]
copy

Unset a value in yadm's Git configuration
$ yadm gitconfig --unset [key]
copy

List all values in yadm's Git configuration
$ yadm gitconfig --list
copy

SYNOPSIS

yadm-gitconfig

DESCRIPTION

yadm-gitconfig is a helper script used by yadm (Yet Another Dotfiles Manager) to manage Git configuration within the repository. It automates the process of setting up Git aliases and global configurations based on the contents of the ~/.config/yadm/gitconfig file. This file allows users to define custom Git configurations that are automatically applied when yadm initializes or updates its managed dotfiles. The script simplifies synchronizing Git settings across multiple machines, ensuring a consistent Git experience.

It reads the configuration file and applies the specified settings using git config commands. This allows users to define aliases, global settings, and other Git options that are then applied to the system's Git configuration, making it easy to manage and synchronize Git setups across different environments. The primary goal is to provide a streamlined mechanism for controlling Git's behavior within yadm's dotfile management system.

CAVEATS

This command is intended to be used internally by yadm. Direct execution might not produce the desired results without the proper yadm environment.

USAGE

yadm-gitconfig is typically invoked automatically by yadm during initialization and updates. It parses the ~/.config/yadm/gitconfig file and executes the corresponding git config commands to set up aliases and global settings.

FILE FORMAT

The ~/.config/yadm/gitconfig file uses a standard Git configuration file format. Sections are denoted by square brackets, e.g., [alias], and entries within sections follow the key = value syntax. Aliases define short commands that expand to longer Git commands. Global settings can be any valid Git configuration option.

EXAMPLE

The following is an example of the content of ~/.config/yadm/gitconfig

[alias]
co = checkout
br = branch

[core]
editor = vim

This example defines two aliases, co for checkout, and br for branch, and sets the default editor to vim

SEE ALSO

yadm(1), git(1), git-config(1)

Copied to clipboard