summaryrefslogtreecommitdiff
path: root/devdocs/git/git-for-each-repo.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/git/git-for-each-repo.html
new repository
Diffstat (limited to 'devdocs/git/git-for-each-repo.html')
-rw-r--r--devdocs/git/git-for-each-repo.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/git/git-for-each-repo.html b/devdocs/git/git-for-each-repo.html
new file mode 100644
index 00000000..f904a74f
--- /dev/null
+++ b/devdocs/git/git-for-each-repo.html
@@ -0,0 +1,6 @@
+<h1>git-for-each-repo</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>git-for-each-repo - Run a Git command on a list of repositories</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content" data-language="shell">git for-each-repo --config=&lt;config&gt; [--] &lt;arguments&gt;</pre> </div> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <p>Run a Git command on a list of repositories. The arguments after the known options or <code>--</code> indicator are used as the arguments for the Git subprocess.</p> <p>THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.</p> <p>For example, we could run maintenance on each of a list of repositories stored in a <code>maintenance.repo</code> config variable using</p> <div class="listingblock"> <div class="content"> <pre data-language="shell">git for-each-repo --config=maintenance.repo maintenance run</pre> </div> </div> <p>This will run <code>git -C &lt;repo&gt; maintenance run</code> for each value <code>&lt;repo&gt;</code> in the multi-valued config variable <code>maintenance.repo</code>.</p> </div> <h2 id="_options">Options</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-for-each-repo.txt---configltconfiggt"> --config=&lt;config&gt; </dt> <dd> <p>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.</p> <p>These config values are loaded from system, global, and local Git config, as available. If <code>git for-each-repo</code> is run in a directory that is not a Git repository, then only the system and global config is used.</p> </dd> </dl> </div> </div> <h2 id="_subprocess_behavior">Subprocess behavior</h2> <div class="sectionbody"> <p>If any <code>git -C &lt;repo&gt; &lt;arguments&gt;</code> subprocess returns a non-zero exit code, then the <code>git for-each-repo</code> process returns that exit code without running more subprocesses.</p> <p>Each <code>git -C &lt;repo&gt; &lt;arguments&gt;</code> subprocess inherits the standard file descriptors <code>stdin</code>, <code>stdout</code>, and <code>stderr</code>.</p> </div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2012&ndash;2024 Scott Chacon and others<br>Licensed under the MIT License.<br>
+ <a href="https://git-scm.com/docs/git-for-each-repo" class="_attribution-link">https://git-scm.com/docs/git-for-each-repo</a>
+ </p>
+</div>