yadm-upgrade
Upgrade yadm to the latest version
TLDR
Upgrade yadm to the latest version
Force the upgrade regardless of changes
SYNOPSIS
yadm upgrade [options...]
PARAMETERS
-q, --quiet
Suppress all output from the command, except for errors.
--dry-run
Perform a trial run with no changes made, showing what would be done.
--ff-only
Refuse to merge unless the fetch can be resolved as a fast-forward. Ensures a linear history.
--no-ff
Force a merge commit even if a fast-forward merge is possible.
--rebase
Rebase the current branch on top of the upstream branch after fetching. This avoids merge commits and keeps a linear history.
--autostash
Automatically stash and later unstash local modifications before and after the operation to prevent conflicts.
--no-autostash
Disable automatic stash/unstash behavior, even if configured.
DESCRIPTION
yadm-upgrade (often simply invoked as yadm upgrade) is a convenience alias for yadm pull. It automates the process of fetching and integrating changes from the configured remote repository into your local yadm dotfile repository. This command is essential for keeping your dotfiles synchronized across multiple machines or for pulling the latest changes from your central dotfile repository.
Under the hood, yadm upgrade executes git pull, which typically performs a git fetch followed by a git merge or git rebase, depending on your Git configuration. It's a fundamental operation for maintaining an up-to-date and consistent dotfile setup managed by yadm.
CAVEATS
Uncommitted Changes:
If you have uncommitted changes in your yadm repository, yadm upgrade might fail or require stashing/committing those changes first, unless --autostash is used or configured.
Merge Conflicts:
If the remote changes conflict with your local modifications, yadm upgrade will stop with merge conflicts. You will need to resolve these conflicts manually using git status, git diff, and git add before committing the merge.
Rebase Risks:
Using --rebase can rewrite history. Be cautious if you have shared your local yadm repository or pushed branches that others are tracking, as rebasing can cause issues for collaborators.
Network Connectivity:
The command requires an active internet connection to communicate with the remote Git repository.
BEHIND THE SCENES
The yadm upgrade command essentially executes git pull within your yadm repository (typically located at ~/.yadm/repo.git or similar). This means all git pull configurations and hooks apply.
CONFIGURATION
The default behavior of yadm upgrade (and git pull) can be configured using Git's configuration system, for example, git config pull.rebase true to always rebase instead of merge, or git config pull.ff only to enforce fast-forward merges.
HISTORY
The yadm (Yet Another Dotfiles Manager) project was created to provide a simple yet powerful way to manage dotfiles using Git. The upgrade command was introduced as a convenient alias for yadm pull to simplify the common task of synchronizing dotfiles with a remote repository. This reflects a design philosophy aimed at ease of use for routine operations, abstracting the underlying Git commands while retaining their full power through option pass-through.