All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # Getting started with vcsh #
3 Below, you will find a few different methods for setting up vcsh:
6 2. The steal-from-template way
8 4. Using vcsh without mr
10 # 1. The template way #
12 ## 1.1 Prerequisites ##
14 Make sure none of the following files/diretories exist for your test (user). If they do, move them away for now:
18 * ~/.config/mr/available.d/mr.vcsh
19 * ~/.config/mr/available.d/zsh.vcsh
20 * ~/.config/mr/config.d/mr.vcsh
21 * ~/.config/vcsh/repo.d/mr.git/
23 All of the files are part of the template repository, the directory is where the template will be stored.
25 apt-get install mr # this is optional, but highly recommended
27 ## 1.2 Clone the template ##
31 git clone git://github.com/RichiH/vcsh.git vcsh
33 ln -s vcsh /usr/local/bin # or add it to your PATH
35 vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr.vcsh
37 ## 1.3 Enable your test repository ##
40 mv ~/.zshrc ~/zshrc.bak
41 cd ~/.config/mr/config.d/
42 ln -s ../available.d/zsh.vcsh . # link, and thereby enable, the zsh repository
46 ## 1.4 Set up your own repositories ##
48 Now, it's time to edit the template config and fill it with your own remotes:
50 vim .config/mr/available.d/mr.vcsh
51 vim .config/mr/available.d/zsh.vcsh
53 And then create your own stuff:
56 vcsh run foo git add -f bar baz quux
57 vcsh run foo git remote add origin git://quuux
58 vcsh run foo git commit
61 cp .config/mr/available.d/mr.vcsh .config/mr/available.d/foo.vcsh
62 vim .config/mr/available.d/foo.vcsh # add your own repo
68 ### 1.5.1 Keeping repositories up-to-date ###
70 This is the beauty of it all. Once you are set up, just run:
77 ### 1.5.2 Making changes ###
79 After you have made some changes, for which you would normally use `git add` and `git commit`, use the vcsh wrapper (like above):
81 vcsh run foo git add -f bar baz quux
82 vcsh run foo git commit
85 By the way, you'll have to use -f/--force flag with git-add because all files will be ignored by default. This is to show you only useful output when running git-status.
86 A fix for this problem is being worked on.
89 # 2. The steal-from-template way #
91 You're welcome to clone the example repository:
93 git clone git://github.com/RichiH/vcsh_mr_template.git
95 Look around in the clone. It should be reasonably simple to understand. If not, poke me, RichiH, on Freenode (query) or OFTC (#vcs-home).
100 This is how my old setup procedure looked like. Adapt it to your own style or copy mine verbatim, either is fine.
106 # Clone vcsh and make it available
107 git clone git://github.com/RichiH/vcsh.git vcsh
108 sudo ln -s ~/work/git/vcsh/vcsh /usr/bin/local
111 Grab my mr config. see below for details on how I set this up
113 vcsh clone ssh://<remote>/mr.git
114 cd ~/.config/mr/config.d/
115 ln -s ../available.d/* .
118 mr is used to actually retrieve configs, etc
122 include = cat ~/.config/mr/config.d/*
123 ~ % echo $XDG_CONFIG_HOME
125 ~ % ls $XDG_CONFIG_HOME/mr/available.d # random selection of my repos
126 git-annex gitk.vcsh git.vcsh ikiwiki mr.vcsh reportbug.vcsh snippets.git wget.vcsh zsh.vcsh
128 # then simply ln -s whatever you want on your local machine from
129 # $XDG_CONFIG_HOME/mr/available.d to $XDG_CONFIG_HOME/mr/config.d
133 # 4. Using vcsh without mr #
135 vcsh encourages you to use mr.
136 It helps you manage a large number of repositories by running the necessary vcsh commands for you.
137 You may choose not to use mr, in which case you will have to run those commands manually or by other means.
139 ## 4.1 A few examples ##
141 To initialize a new repository: `vcsh init zsh`
143 To clone a repository: `vcsh clone ssh://<remote>/zsh.git`
145 To interact with a repository, use the regular Git commands, but prepend them with `vcsh run $repository_name`.
148 vcsh run zsh git status
149 vcsh run zsh git add -f .zshrc
150 vcsh run zsh git commit
152 Obviously, without mr keeping repositories up-to-date, it will have to be done manually.
153 Alternatively, you could try something like this:
155 for repo in `vcsh list`; do
156 vcsh run $repo git pull;
160 Questions? RichiH@{Freenode,OFTC,IRCnet}