]> 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:

break example
[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:
44
45         [bar]
46         # This repository has an upstream, which I've forked; 
47         # set up a remote on checkout.
48         checkout = 
49                 git clone git@github.com:joeyh/bar.git
50                 cd bar
51                 git remote add upstream git@github.com:barbar/bar.git
52         # make `mr zap` integrate from upstream
53         zap = 
54                 git pull upstream
55                 git merge upstream/master
56                 git push origin master
57
58 You can even define commands globally, so `mr` can use them in all repositories.
59
60         [DEFAULT]
61         # Teach mr how to `mr gc` in git repos.
62         git_gc = git gc "$@"
63
64 This only scratches the surface of the ways you can use myrepos to automate
65 and mange your repositories!
66
67 Some more examples of things it can do include:
68
69 * Update a repository no more frequently than once every twelve hours.
70 * Run an arbitrary command before committing to a repository.
71 * Remember actions that failed due to a laptop being offline, so they
72   can be retried when it comes back online.
73 * Combine several related repositories into a single logical repository,
74   with its own top-level `.mrconfig` file that lists them and can be
75   chain loaded from `~/.mrconfig`.
76 * Manage your whole home directory in version control.
77   (See [VCS-Home](http://vcs-home.branchable.com/))
78
79 ## news
80
81 [[!inline pages="news/* and !*/Discussion" show="4" archive=yes]]