]> git.madduck.net Git - code/myrepos.git/blob - doc/index.mdwn

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:

update
[code/myrepos.git] / doc / index.mdwn
1 You have a lot of version control repositories. Sometimes you want to
2 update them all at once. Or push out all your local changes. You use
3 special command lines in some repositories to implement specific workflows.
4 Myrepos provides a `mr` command, which is a tool to manage all your version
5 control repositories.
6
7 ## getting started
8
9 All you need to get started is some already checked out repos.
10 These could be using git, or bzr, mercurial or darcs, or many other version
11 control systems. Doesn't matter, they're all supported!
12
13 Inside each of your repositories, run `mr register`.
14 That sets up a `~/.mrconfig` file listing your repositories.
15
16 Now you can run `mr update` in your home directory, and it'll update
17 every one of your repositories that you've registered with myrepos.
18
19 Want to update repositories in parallel? `mr update -j5` will run 5
20 concurrent jobs!
21
22 If you run `mr update` inside a repository, it'll only act on that
23 repository. In general, any `mr` command runs recursively over any
24 repository located somewhere in or under the current directory.
25
26 You can also run `mr commit`, `mr push`, `mr status`, `mr diff`, and a lot
27 of other commands. These work no matter which version control system is
28 used for a repository. Of course, you can still use the native version
29 control commands too.
30
31 Oh, and you can abbreviate any command to any unambiguous abbreviation. 
32 `mr up`, `mr pu`, etc.
33
34 Now, maybe you find that you always want to update one repository using
35 `git pull --rebase`, instead of the default `git pull` that `mr update` runs. 
36 No problem: The `~/.mrconfig` file makes it easy to override the command
37 run for any repository. It's like a `Makefile` for repositories.
38
39         [foo]
40         checkout = git@github.com:joeyh/foo.git
41         update = git pull --rebase
42
43 You can make up your own commands too, and add them to a single repository,
44 or even globally so `mr` can use them in all repositories.
45
46         [bar]
47         # This repository has an upstream, which I've forked; 
48         # set up a remote on checkout.
49         checkout = 
50                 git clone git@github.com:joeyh/bar.git
51                 cd bar
52                 git remote add upstream git@github.com:barbar/bar.git
53         # make `mr zap` integrate from upstream
54         zap = 
55                 git pull upstream
56                 git merge upstream/master
57                 git push origin master
58
59         [DEFAULT]
60         # Teach mr how to `mr reup` to update with rebasing.
61         git_reup = git pull --rebase
62
63 This only scratches the surface of the ways you can use myrepos to automate
64 and mange your repositories!
65
66 Some more examples of things it can do include:
67
68 * Update a repository no more frequently than once every twelve hours.
69 * Run an arbitrary command before committing to a repository.
70 * Remember actions that failed due to a laptop being offline, so they
71   can be retried when it comes back online.
72 * Combine several related repositories into a single logical repository,
73   with its own top-level `.mrconfig` file that lists them and can be
74   chain loaded from `~/.mrconfig`.
75 * Manage your whole home directory in version control.
76   (See [VCS-Home](http://vcs-home.branchable.com/))
77
78 ## install
79
80 `git clone git://myrepos.branchable.com/ myrepos`  
81 Or get it [from github]().
82
83 It's a simple perl script, which can be copied anywhere to install.
84
85 Myrepos is included in all recent versions of Debian. `apt-get install mr`  
86 It's also in Mac Homebrew as `mr`.
87
88 ## bugs
89
90 Bugs should be filed to the [Debian BTS](http://bugs.debian.org/mr).
91
92 ## news
93
94 [[!inline pages="news/* and !*/Discussion" show="4" archive=yes]]
95
96 [[!sidebar content="""
97 <a href="https://flattr.com/thing/39937/mr1" target="_blank">
98 <img src="http://api.flattr.com/button/button-static-50x60.png" alt="Flattr this" title="Flattr this" border="0" /></a>
99 """]]