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

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:

76d887b622f6768e2f882261b41c24f6e1fde40a
[code/vcsh.git] / INSTALL
1 =The template way=
2
3 ==Prerequisites==
4
5 Make sure none of those files/diretories exist for your test (user). If they do, move them away for now:
6
7 ~/.gitignore
8 ~/.mrconfig
9 ~/.config/mr/available.d/mr.vcsh
10 ~/.config/mr/available.d/zsh.vcsh
11 ~/.config/mr/config.d/mr.vcsh
12 ~/.config/vcsh/repo.d/mr.git/
13
14 All of the files are part of the template repo, the directory is where the template will be stored
15
16 apt-get install mr # this is optional, but highly recommended
17
18 ==Clone the template==
19
20     mkdir -p ~/work/git
21     cd !$
22     git clone git://github.com/RichiH/vcsh.git vcsh
23     cd vcsh
24     ln -s vcsh /usr/local/bin
25     cd
26     vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr.vcsh 
27
28 ==Enable your test repository==
29
30     mv ~/.zsh   ~/zsh.bak
31     mv ~/.zshrc ~/zsh.bak
32     cd ~/.config/mr/config.d/
33     ln -s ../available.d/mr.vcsh .
34     cd
35     mr up
36
37 ==Set up your own repos==
38
39 Now, it's time to edit the template config and fill it with your own remotes:
40
41     vim .config/mr/available.d/mr.vcsh
42     vim .config/mr/available.d/zsh.vcsh
43
44 And then create your own stuff
45
46     vcsh init foo
47     vcsh run foo git add -f bar baz quux
48     vcsh run foo git remote add origin git://quuux
49     vcsh run foo git commit
50     vcsh run foo git push
51     
52     cp .config/mr/available.d/mr.vcsh .config/mr/available.d/foo.vcsh
53     vim .config/mr/available.d/foo.vcsh # add your own repo
54
55 Done!
56
57 ==Daily use==
58
59 This is the beauty of it all. Once you are set up, just run:
60
61    mr up
62    mr push
63
64 Neat.
65
66
67 =The steal-from-template way=
68
69     git clone git://github.com/RichiH/vcsh_mr_template.git
70
71 Then look around in the clone. Should be reasonable simple to understand. If not, poke me RichiH on freenode (query) or OFTC (#vcs-home).
72
73
74 =The manual way=
75
76 # This is how my setup looks. Adapt to your style or copy mine verbatim, both is fine.
77
78 # Create workspace
79     mkdir -p ~/work/git
80     cd !$
81
82 # Clone vcsh and make it available
83     git clone git://github.com/RichiH/vcsh.git vcsh
84     PATH+=":$HOME/work/git/vcsh"
85     export PATH
86
87 # Grab my mr config. see below for details on how I set this up
88     ~/work/git/vcsh/vcsh clone ssh://<remote>/mr.git
89     cd ~/.config/mr/config.d/
90     ln -s ../available.d/* .
91
92 # make vcsh work by default. Adapt for Bash etc as needed
93     cd
94     zsh ~/work/git/vcsh/vcsh clone ssh://<remote>/zsh.git
95     ln -s ~/work/git/vcsh/vcsh .zsh/functions
96     zsh
97
98
99
100
101 ################
102
103 # mr
104
105     ~ % cat ~/.mrconfig
106     [DEFAULT]
107     include = cat ~/.config/mr/config.d/*
108     ~ % echo $XDG_CONFIG_HOME
109     /home/richih/.config
110     ~ % ls $XDG_CONFIG_HOME/mr/available.d # random selection of my repos
111     git-annex gitk.vcsh git.vcsh ikiwiki mr.vcsh reportbug.vcsh snippets.git wget.vcsh zsh.vcsh
112     ~ % 
113 # then simply ln -s whatever you want on your local machine from
114 # $XDG_CONFIG_HOME/mr/available.d to $XDG_CONFIG_HOME/mr/config.d
115     ~ % cd
116     ~ % mr -j 5 up