]> git.madduck.net Git - code/vcsh.git/blob - INSTALL.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add ronn-based manpage
[code/vcsh.git] / INSTALL.md
1 # Getting started with vcsh #
2
3 Below you will find three methods for setting up vcsh:
4
5 1. The template way
6 2. The steal-from-template way
7 3. The manual way
8
9 # 1. The template way #
10
11 ## Prerequisites ##
12
13 Make sure none of the following files/diretories exist for your test (user). If they do, move them away for now:
14
15 * ~/.gitignore
16 * ~/.mrconfig
17 * ~/.config/mr/available.d/mr.vcsh
18 * ~/.config/mr/available.d/zsh.vcsh
19 * ~/.config/mr/config.d/mr.vcsh
20 * ~/.config/vcsh/repo.d/mr.git/
21
22 All of the files are part of the template repository, the directory is where the template will be stored.
23
24     apt-get install mr               # this is optional, but highly recommended
25
26 ## Clone the template ##
27
28     mkdir -p ~/work/git
29     cd !$
30     git clone git://github.com/RichiH/vcsh.git vcsh
31     cd vcsh
32     ln -s vcsh /usr/local/bin        # or add it to your PATH
33     cd
34     vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr.vcsh
35
36 ## Enable your test repository ##
37
38     mv ~/.zsh   ~/zsh.bak
39     mv ~/.zshrc ~/zshrc.bak
40     cd ~/.config/mr/config.d/
41     ln -s ../available.d/zsh.vcsh .  # link, and thereby enable, the zsh repository
42     cd
43     mr up
44
45 ## Set up your own repositories ##
46
47 Now, it's time to edit the template config and fill it with your own remotes:
48
49     vim .config/mr/available.d/mr.vcsh
50     vim .config/mr/available.d/zsh.vcsh
51
52 And then create your own stuff:
53
54     vcsh init foo
55     vcsh run foo git add -f bar baz quux
56     vcsh run foo git remote add origin git://quuux
57     vcsh run foo git commit
58     vcsh run foo git push
59
60     cp .config/mr/available.d/mr.vcsh .config/mr/available.d/foo.vcsh
61     vim .config/mr/available.d/foo.vcsh # add your own repo
62
63 Done!
64
65 ## Daily use  ##
66
67 ### Keeping repositories up-to-date ###
68
69 This is the beauty of it all. Once you are set up, just run:
70
71    mr up
72    mr push
73
74 Neat.
75
76 ### Making changes ###
77
78 After you have made some changes, for which you would normally use `git add` and `git commit`, use the vcsh wrapper (like above):
79
80     vcsh run foo git add -f bar baz quux
81     vcsh run foo git commit
82     vcsh run foo git push
83
84 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.
85 A fix for this problem is being worked on.
86
87
88 # 2. The steal-from-template way #
89
90 You're welcome to clone the example repository:
91
92     git clone git://github.com/RichiH/vcsh_mr_template.git
93
94 Look around in the clone. It should be reasonably simple to understand. If not, poke me, RichiH, on Freenode (query) or OFTC (#vcs-home).
95
96
97 # 3. The manual way #
98
99 This is how my old setup procedure looked like. Adapt it to your own style or copy mine verbatim, either is fine.
100
101     # Create workspace
102     mkdir -p ~/work/git
103     cd !$
104
105     # Clone vcsh and make it available
106     git clone git://github.com/RichiH/vcsh.git vcsh
107     sudo ln -s ~/work/git/vcsh/vcsh /usr/bin/local
108     hash -r
109
110 Grab my mr config. see below for details on how I set this up
111
112     vcsh clone ssh://<remote>/mr.git
113     cd ~/.config/mr/config.d/
114     ln -s ../available.d/* .
115
116
117 mr is used to actually retrieve configs, etc
118
119     ~ % cat ~/.mrconfig
120     [DEFAULT]
121     include = cat ~/.config/mr/config.d/*
122     ~ % echo $XDG_CONFIG_HOME
123     /home/richih/.config
124     ~ % ls $XDG_CONFIG_HOME/mr/available.d # random selection of my repos
125     git-annex gitk.vcsh git.vcsh ikiwiki mr.vcsh reportbug.vcsh snippets.git wget.vcsh zsh.vcsh
126     ~ %
127     # then simply ln -s whatever you want on your local machine from
128     # $XDG_CONFIG_HOME/mr/available.d to $XDG_CONFIG_HOME/mr/config.d
129     ~ % cd
130     ~ % mr -j 5 up