LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

vcsh

Manage dotfiles with multiple Git repos

TLDR

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

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
copy
sudo pacman -S vcsh
copy
sudo zypper install vcsh
copy
brew install vcsh
copy
nix profile install nixpkgs#vcsh
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid