Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-for-each-repo.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-for-each-repo.adoc` 68 lines ยท 1941 bytes Raw Blame History 1 git-for-each-repo(1) 2 ==================== 3 4 NAME 5 ---- 6 git-for-each-repo - Run a Git command on a list of repositories 7 8 9 SYNOPSIS 10 -------- 11 [verse] 12 'git for-each-repo' --config= [--] 13 14 15 DESCRIPTION 16 ----------- 17 Run a Git command on a list of repositories. The arguments after the 18 known options or `--` indicator are used as the arguments for the Git 19 subprocess. 20 21 THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. 22 23 For example, we could run maintenance on each of a list of repositories 24 stored in a `maintenance.repo` config variable using 25 26 ------------- 27 git for-each-repo --config=maintenance.repo maintenance run 28 ------------- 29 30 This will run `git -C maintenance run` for each value `` 31 in the multi-valued config variable `maintenance.repo`. 32 33 34 OPTIONS 35 ------- 36 --config=:: 37 Use the given config variable as a multi-valued list storing 38 absolute path names. Iterate on that list of paths to run 39 the given arguments. 40 + 41 These config values are loaded from system, global, and local Git config, 42 as available. If `git for-each-repo` is run in a directory that is not a 43 Git repository, then only the system and global config is used. 44 45 --keep-going:: 46 Continue with the remaining repositories if the command failed 47 on a repository. The exit code will still indicate that the 48 overall operation was not successful. 49 + 50 Note that the exact exit code of the failing command is not passed 51 through as the exit code of the `for-each-repo` command: If the command 52 failed in any of the specified repositories, the overall exit code will 53 be 1. 54 55 SUBPROCESS BEHAVIOR 56 ------------------- 57 58 If any `git -C ` subprocess returns a non-zero exit code, 59 then the `git for-each-repo` process returns that exit code without running 60 more subprocesses. 61 62 Each `git -C ` subprocess inherits the standard file 63 descriptors `stdin`, `stdout`, and `stderr`. 64 65 66 GIT 67 --- 68 Part of the linkgit:git[1] suite