logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

git-for-each-repo.1 (3389B)


  1. '\" t
  2. .\" Title: git-for-each-repo
  3. .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
  5. .\" Date: 2025-03-14
  6. .\" Manual: Git Manual
  7. .\" Source: Git 2.49.0
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-FOR\-EACH\-REPO" "1" "2025-03-14" "Git 2\&.49\&.0" "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. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git-for-each-repo \- Run a Git command on a list of repositories
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit for\-each\-repo\fR \-\-config=<config> [\-\-] <arguments>
  36. .fi
  37. .SH "DESCRIPTION"
  38. .sp
  39. 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\&.
  40. .sp
  41. THIS COMMAND IS EXPERIMENTAL\&. THE BEHAVIOR MAY CHANGE\&.
  42. .sp
  43. For example, we could run maintenance on each of a list of repositories stored in a \fBmaintenance\&.repo\fR config variable using
  44. .sp
  45. .if n \{\
  46. .RS 4
  47. .\}
  48. .nf
  49. git for\-each\-repo \-\-config=maintenance\&.repo maintenance run
  50. .fi
  51. .if n \{\
  52. .RE
  53. .\}
  54. .sp
  55. This will run \fBgit\fR \fB\-C\fR \fI<repo>\fR \fBmaintenance\fR \fBrun\fR for each value \fI<repo>\fR in the multi\-valued config variable \fBmaintenance\&.repo\fR\&.
  56. .SH "OPTIONS"
  57. .PP
  58. \-\-config=<config>
  59. .RS 4
  60. 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\&.
  61. .sp
  62. These config values are loaded from system, global, and local Git config, as available\&. If
  63. \fBgit\fR
  64. \fBfor\-each\-repo\fR
  65. is run in a directory that is not a Git repository, then only the system and global config is used\&.
  66. .RE
  67. .PP
  68. \-\-keep\-going
  69. .RS 4
  70. Continue with the remaining repositories if the command failed on a repository\&. The exit code will still indicate that the overall operation was not successful\&.
  71. .sp
  72. Note that the exact exit code of the failing command is not passed through as the exit code of the
  73. \fBfor\-each\-repo\fR
  74. command: If the command failed in any of the specified repositories, the overall exit code will be 1\&.
  75. .RE
  76. .SH "SUBPROCESS BEHAVIOR"
  77. .sp
  78. If any \fBgit\fR \fB\-C\fR \fI<repo>\fR \fI<arguments>\fR subprocess returns a non\-zero exit code, then the \fBgit\fR \fBfor\-each\-repo\fR process returns that exit code without running more subprocesses\&.
  79. .sp
  80. Each \fBgit\fR \fB\-C\fR \fI<repo>\fR \fI<arguments>\fR subprocess inherits the standard file descriptors \fBstdin\fR, \fBstdout\fR, and \fBstderr\fR\&.
  81. .SH "GIT"
  82. .sp
  83. Part of the \fBgit\fR(1) suite