2 rgit - Recursively execute a command on all the git repositories in a
9 rgit [-K|-I|-D|-V] [GIT_OPTIONS] COMMAND [COMMAND_ARGS]
12 This utility recursively searches in a root directory (which may be the
13 current working directory or - if it has been set - the directory given
14 by the "GIT_DIR" environment variable) for all git repositories, sort
15 this list by the repository path, "chdir" into each of them, and
16 executes the specified git command. For efficiency reasons, repositories
17 located inside a bare repository or under the .git directory of a work
18 repository won't be searched for.
20 Moreover, those formats are substituted in the arguments before running
23 * %n with the current repository name.
25 * %g with the relative path (based from the root directory) to the
28 * %G with the absolute path to the current repository.
30 * %w with the relative path (based from the root directory) to the
31 current repository's working directory.
33 * %W with the absolute path to the current repository's working
36 * %b with a "bareified" relative path, i.e. %g if this is a bare
37 repository, and "%w.git" otherwise.
39 * %B with an absolute version of the "bareified" path.
41 * %R with the absolute path to the root directory.
43 * "%%" with a bare "%".
45 There are actually a few commands that are only executed once in the
46 root directory : "daemon", "gui", "help", "init" and "version". For any
47 of those, no format substitution is done.
49 You can specify which "git" executable to use with the "GIT_EXEC_PATH"
53 "rgit" takes its options as the capital switches that comes before the
54 git command. It's possible to bundle them together. They are removed
55 from the argument list before calling "git".
59 Keep processing on error. The default policy is to stop whenever an
64 Enables interactive mode when the standard input is a tty. Requires
65 Term::ReadKey to be installed. This lets you choose interactively
66 what to do when one of the commands returns a non-zero status.
77 Execute "git gc" on all the repositories below the current directory :
81 Tag all the repositories with their name :
85 Add a remote to all repositories in "/foo/bar" to their bare counterpart
88 GIT_DIR="/foo/bar" rgit remote add host git://host/qux/%b
91 The core modules Carp, Config, Cwd, Exporter, File::Find, File::Spec and
95 Vincent Pit, "<perl at profvince.com>", <http://profvince.com>.
97 You can contact me by mail or on "irc.perl.org" (vincent).
100 Please report any bugs or feature requests to "bug-rgit at rt.cpan.org",
101 or through the web interface at
102 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>. I will be
103 notified, and then you'll automatically be notified of progress on your
104 bug as I make changes.
107 You can find documentation for this module with the perldoc command.
111 Tests code coverage report is available at
112 <http://www.profvince.com/perl/cover/rgit>.
115 Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
117 This program is free software; you can redistribute it and/or modify it
118 under the same terms as Perl itself.