vcsh

  1. Initialise repository REPO, creating a file in ~/.config/vcsh/repo.d/REPO.git:

    vcsh init REPO

  2. Copy the template gitignore and replace expample keyword by REPO:

    cp ~/.gitignore.d/{template,REPO} && sed -i "s|example|REPO|g" ~/.gitignore.d/REPO

  3. 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

  4. Check that every REPO config file is tracked

    vcsh list-tracked-by REPO

  5. Commit the changes

    vcsh REPO commit -av

  6. Create a remote repo

    Create remote repo in gitlab or whatever host (i.e. git@gitlab.com:mydotfiles/REPO)

  7. 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

  1. 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

  2. Put it in the config directory to make it available for mr

    cd ~/.config/mr/config.d && ln -s ../available.d/REPO.vcsh

  3. 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

  1. Install git, ssh, vcsh and mr

  2. Generate ssh key with ssh-keygen and upload it to gitlab

    ssh-keygen -t rsa -C "acb@localhostname" -b 4096

  3. 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

  4. Update all repos with

    mr up