vcsh

Manage dotfiles with multiple Git repos

TLDR

Initialize repo
$ vcsh init [reponame]
Clone repo
$ vcsh clone [url] [reponame]
Run git command
$ vcsh [reponame] [git-command]
List repos
$ vcsh list
Enter repo
$ vcsh enter [reponame]
Status all
$ vcsh status
List tracked files
$ vcsh list-tracked [reponame]
Pull all repos
$ vcsh pull
Add and commit a file in a repo
$ vcsh [reponame] add [~/.bashrc] && vcsh [reponame] commit -m "[message]"
Push all repos
$ vcsh push
Rename a repo
$ vcsh rename [oldname] [newname]

SYNOPSIS

vcsh [init|clone|list|enter|run|pull|push] [reponame] [args]

DESCRIPTION

vcsh manages configuration files (dotfiles) using multiple Git repositories that all share the same working directory ($HOME). Each repository tracks a separate set of files, allowing modular organization of shell configs, editor settings, and other dotfiles.The tool uses bare Git repositories to avoid conflicts between repos that coexist in the same directory. The enter command opens a subshell scoped to a specific repository, while running git commands directly against a named repo is also supported.

PARAMETERS

init reponame

Initialize an empty repo.
clone url [reponame]
Clone from URL.
list
List all repos.
list-tracked [reponame]
List tracked files.
list-untracked [-a] [-r]
List untracked files. -a shows all, -r is recursive.
enter reponame
Spawn subshell with $GIT_DIR set.
run reponame command
Run command with $GITDIR and $GITWORK_TREE set.
pull
Pull from all repos.
push
Push all repos.
rename old new
Rename a repository.
status [reponame]
Show status of all or one repo.
write-gitignore reponame
Write .gitignore.d/reponame via git ls-files.
delete reponame
Delete a repository.

ENVIRONMENT

VCSH_REPO_D

Directory where bare repositories are stored (default: $XDGCONFIGHOME/vcsh/repo.d).

INSTALL

sudo dnf install vcsh
sudo pacman -S vcsh
sudo zypper install vcsh
brew install vcsh
nix profile install nixpkgs#vcsh

CAVEATS

Requires basic Git knowledge. Bare repositories can be confusing -- use `vcsh enter` to inspect repo state. Files tracked by multiple repos will cause conflicts.

HISTORY

vcsh (version control system for $HOME) was created by Richard Hartmann for managing multiple Git repositories overlaid on $HOME.

SEE ALSO

git(1), mr(1), stow(1), yadm(1), chezmoi(1)