yadm-init
Initialize yadm repository and track existing dotfiles
TLDR
Execute
Override the worktree
Overwrite an existing repository
SYNOPSIS
yadm init [OPTIONS] [REMOTE_URL]
PARAMETERS
-f, --force
Overwrite existing yadm repository without prompting.
-g, --gpg
Initialize with GPG encryption support (experimental).
--bootstrap
Run bootstrap script after initializing.
REMOTE_URL
URL of the remote Git repository to associate with the yadm repository.
DESCRIPTION
yadm init initializes a new yadm (Yet Another Dotfiles Manager) repository in your home directory.
It converts your existing dotfiles (configuration files starting with a '.'), such as .bashrc, .vimrc, .gitconfig, etc., into files tracked by Git within a designated yadm directory (typically ~/.yadm). This allows you to version control, back up, and easily deploy your dotfiles across multiple machines.
yadm init effectively sets up a bare Git repository tailored for managing these configuration files. It ensures the original files are replaced with symbolic links pointing into the yadm repository, making them actively managed.
The command provides options to specify a remote repository URL, if you want to push your dotfiles to a remote server right from the beginning. This remote URL acts as your dotfiles' remote backup and allows easy deployment and synchonization of them in other machines. Initialization without a remote repository can be done, allowing for later remote setup.
CAVEATS
Initializing yadm will replace your original dotfiles with symbolic links. Ensure you have backups before proceeding, especially if you're unsure about the process.
DIRECTORY STRUCTURE
After initialization, yadm creates a directory, by default ~/.yadm, which contains the bare Git repository and a 'bootstrap' script. Your dotfiles are stored within this repository and accessed through symbolic links in your home directory.
BOOTSTRAP SCRIPT
The 'bootstrap' script (~/.yadm/bootstrap) can be used to perform post-initialization tasks, such as installing required software or configuring specific settings. It's executed automatically if the --bootstrap option is used during initialization.
HISTORY
yadm is a relatively recent dotfiles management tool. It aims to provide a simple and user-friendly alternative to other complex solutions. Its initial commit to Github happened in 2014, and its main goals are simplicity and ease of use compared to tools like GNU Stow or complex shell scripts.