2 .\" Title: git-for-each-repo
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.40.0.rc2
10 .TH "GIT\-FOR\-EACH\-REPO" "1" "03/06/2023" "Git 2\&.40\&.0\&.rc2" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-for-each-repo \- Run a Git command on a list of repositories
35 \fIgit for\-each\-repo\fR \-\-config=<config> [\-\-] <arguments>
40 Run a Git command on a list of repositories\&. The arguments after the known options or \fB\-\-\fR indicator are used as the arguments for the Git subprocess\&.
42 THIS COMMAND IS EXPERIMENTAL\&. THE BEHAVIOR MAY CHANGE\&.
44 For example, we could run maintenance on each of a list of repositories stored in a \fBmaintenance\&.repo\fR config variable using
50 git for\-each\-repo \-\-config=maintenance\&.repo maintenance run
57 This will run \fBgit \-C <repo> maintenance run\fR for each value \fB<repo>\fR in the multi\-valued config variable \fBmaintenance\&.repo\fR\&.
62 Use the given config variable as a multi\-valued list storing absolute path names\&. Iterate on that list of paths to run the given arguments\&.
64 These config values are loaded from system, global, and local Git config, as available\&. If
65 \fBgit for\-each\-repo\fR
66 is run in a directory that is not a Git repository, then only the system and global config is used\&.
68 .SH "SUBPROCESS BEHAVIOR"
70 If any \fBgit \-C <repo> <arguments>\fR subprocess returns a non\-zero exit code, then the \fBgit for\-each\-repo\fR process returns that exit code without running more subprocesses\&.
72 Each \fBgit \-C <repo> <arguments>\fR subprocess inherits the standard file descriptors \fBstdin\fR, \fBstdout\fR, and \fBstderr\fR\&.
75 Part of the \fBgit\fR(1) suite