2 rgit - Recursively execute a command on all the git repositories in a
9 rgit [GIT_OPTIONS] COMMAND [COMMAND_ARGS]
12 This utility recursively searches in the current directory (or in the
13 directory given by the "GIT_DIR" environment variable if it's set) for
14 all git repositories, sort this list by the repository path, "chdir"
15 into each of them, and executes the specified git command. Moreover,
16 those formats are substuted in the arguments before running the command
19 * "^n" with the current repository name.
21 * "^g" with the relative path to the current repository.
23 * "^G" with the absolute path to the current repository.
25 * "^w" with the relative path to the current repository's working
28 * "^W" with the absolute path to the current repository's working
31 * "^b" with a "bareified" relative path, i.e. "^g" if this is a bare
32 repository, and "^w.git" otherwise.
34 * "^B" with an absolute version of the "bareified" path.
36 * "^R" with the absolute path to the current root directory.
38 * "^^" with a bare "^".
40 There are actually a few commands that are only executed once in the
41 current directory : "version", "help", "daemon" and "init". For any of
42 those, no format substitution is done.
44 You can specify which "git" executable to use with the "GIT_EXEC_PATH"
48 Execute "git gc" on all the repositories below the current directory :
52 Tag all the repositories with their name :
56 Add a remote to all repositories in "/foo/bar" to their bare counterpart
59 GIT_DIR="/foo/bar" rgit remote add host git://host/qux/^b
62 The core modules Carp, Cwd, Exporter, File::Find, File::Spec::Functions
68 Vincent Pit, "<perl at profvince.com>", <http://profvince.com>.
70 You can contact me by mail or on "irc.perl.org" (vincent).
73 Please report any bugs or feature requests to "bug-rgit at rt.cpan.org",
74 or through the web interface at
75 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>. I will be
76 notified, and then you'll automatically be notified of progress on your
77 bug as I make changes.
80 You can find documentation for this module with the perldoc command.
84 Tests code coverage report is available at
85 <http://www.profvince.com/perl/cover/rgit>.
88 Copyright 2008 Vincent Pit, all rights reserved.
90 This program is free software; you can redistribute it and/or modify it
91 under the same terms as Perl itself.