vcsh
Initialise repository REPO, creating a file in ~/.config/vcsh/repo.d/REPO.git:
vcsh init REPOCopy the template gitignore and replace expample keyword by REPO:
cp ~/.gitignore.d/{template,REPO} && sed -i "s|example|REPO|g" ~/.gitignore.d/REPOAdd the gitignore first, and then all the non-ignored files in gitignore REPO
vcsh REPO add -f .gitignore.d/REPO && vcsh REPO add -ACheck that every REPO config file is tracked
vcsh list-tracked-by REPOCommit the changes
vcsh REPO commit -avCreate 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.vcshPut it in the config directory to make it available for mr
cd ~/.config/mr/config.d && ln -s ../available.d/REPO.vcshGo 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:
brew install vcsh mrpacman -Ss git ssh vcsh mryay -Ss git ssh vcsh mrapt install git ssh vcsh mrGenerate ssh key with ssh-keygen:
ssh-keygen -t rsa -C "user@localhost" -b 4096Copy the public ssh key to to the clipboard:
cat .ssh/id_rsa.pubUpload public ssh key to Gitlab/ssh_keys and Github-ssh_keys:
Add ssh key to the current session:
ssh-add .ssh/id_rsaClone the mr repository (will create the mr local repo in ~/.config/vcsh/repo.d/mr.git):
vcsh clone git@gitlab.com:mydotfiles/mr.git mrUpdate all repos:
mr up