The Quick Start Guide to vcsh/mr Setup

I recently wrote a post about how to install configure vcsh and mr to convienently manage and use all your repositories.  However for demostration this was quite a manual and long process.  To achieve a very similar outcome in a much shorter time, you could use the provided template and customise from there.

The below will use vcsh to clone the git repository to mr.git in the ~/.config/vcsh/repo.d/ directory.

$ yaourt -Sy vcsh myrepos
$ vcsh clone mr
$ mr update

The above repository is not owned by me so I can not push changes to it. As such you will need to edit the configuration and point it to your repository. I have setup the follow:

Edit ~/.config/mr/available.d/mr.vcsh like so.

$ vim ~/.config/mr/available.d/mr.vcsh

Don’t forget to replace the remote repository with your own.

checkout = vcsh clone mr
update = vcsh mr pull
push =  vcsh mr push
status = vcsh mr status
gc = vcsh mr gc

To see the current remote repository.

[andy@home-pc ~]$ vcsh mr remote show origin
* remote origin
  Fetch URL:
  Push  URL:
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

To remove the above origin from the repository and set your own as the upstream repository.

$ vcsh mr remote remove origin
$ vcsh mr remote add origin
$ vcsh mr push --set-upstream origin master

Now you can add configurations as you like and push them to your remote repository simply with.

$ vcsh mr push

Or you could of course use mr to push changes to all repositories.

$ mr push

But that’s it! Take a look at my previous article or the official documentation for more information about how to add repositories.