LinuxCommandLibrary

yadm-clone

Clone yadm managed dotfiles repository

TLDR

Clone an existing repository

$ yadm clone [remote_repository_location]
copy

Clone an existing repository, then execute the bootstrap file
$ yadm clone [remote_repository_location] --bootstrap
copy

Clone an existing repository and after cloning, do not execute the bootstrap file
$ yadm clone [remote_repository_location] --no-bootstrap
copy

Change the worktree that yadm will use during cloning
$ yadm clone [remote_repository_location] --w [worktree_file]
copy

Change the branch that yadm gets files from
$ yadm clone [remote_repository_location] -b [branch]
copy

Override an existing repository local branch
$ yadm clone [remote_repository_location] -f
copy

SYNOPSIS

yadm clone repository_url [options]

PARAMETERS

repository_url
    The URL of the Git repository to clone.

-b, --branch
    Checkout specified branch.

-m, --manifest
    Use to install dotfiles. Default is manifest.

DESCRIPTION

The `yadm clone` command is used to retrieve a yadm-managed dotfiles repository from a remote location (like GitHub, GitLab, or a local directory). After cloning, it will bootstrap the repository, which typically involves installing dependencies, creating necessary symlinks, and initializing the local configuration. It effectively sets up a new user environment with the dotfiles stored in the repository. yadm is a dotfile manager written in pure sh that leverages Git for version control and allows users to easily manage their dotfiles across multiple machines. It helps in ensuring configuration consistency and simplifies the process of deploying and updating dotfiles. `yadm clone` assumes the first argument is the repository URL. The command internally uses git to clone the repository, and then executes the yadm's bootstrap process to configure the dotfiles environment.

CAVEATS

The clone URL should be a valid Git repository URL.
The bootstrap process depends on the content of the yadm repository. It's recommended to review the repository's contents before cloning to ensure the bootstrap script is trusted.

BOOTSTRAP PROCESS

After cloning, `yadm` runs a bootstrap process. This usually involves
1. Creating symbolic links from the yadm managed files to their actual locations (e.g. ~/.bashrc).
2. Installing any necessary dependencies required by the dotfiles using package managers like apt or yum.
3. Running any user-defined setup scripts.

HISTORY

yadm was created to simplify dotfile management by leveraging git for version control and allowing for customization via templating and hooks. `yadm clone` is a core command that simplifies the initial setup of dotfiles from a central repository, making it easier to synchronize configurations across multiple machines. The usage has grown since the need for simple and light dotfiles solution.

SEE ALSO

yadm(1), git(1)

Copied to clipboard