vcsh
Initialise repository REPO, creating a file in ~/.config/vcsh/repo.d/REPO.git:
vcsh init REPO
Copy the template gitignore and replace expample keyword by REPO:
cp ~/.gitignore.d/{template,REPO} && sed -i "s|example|REPO|g" ~/.gitignore.d/REPO
Add the gitignore first, and then all the non-ignored files in gitignore REPO
vcsh REPO add -f .gitignore.d/REPO && vcsh REPO add -A
Check that every REPO config file is tracked
vcsh list-tracked-by REPO
Commit the changes
vcsh REPO commit -av
Create a remote repo
Create remote repo in gitlab or whatever host (i.e.
git@gitlab.com:mydotfiles/REPO
)Add the remote repo as origin and set it as upstream master
vcsh REPO remote add origin git@gitlab.com:mydotfiles/REPO.git && vcsh REPO push --set-upstream origin master
mr
Create the REPO.vcsh repository config for mr
cd ~/.config/mr/available.d/ && cp {template,REPO}.vcsh && sed -i "s|example|REPO|g" REPO.vcsh
Put it in the config directory to make it available for mr
cd ~/.config/mr/config.d && ln -s ../available.d/REPO.vcsh
Go to ~/ and add it to mr and commit it
cd ~ && vcsh mr add -A && vcsh mr commit -av && vcsh mr push
In a new system
Install git, ssh, vcsh and mr
Generate ssh key with ssh-keygen and upload it to gitlab
ssh-keygen -t rsa -C "acb@localhostname" -b 4096
Clone the mr repository (will create the mr local repo in ~/.config/vcsh/repo.d/mr.git)
vcsh clone git@gitlab.com:mydotfiles/mr.git mr
Update all repos with
mr up