← 返回命令列表

Linux command

git-bulk 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run a git command on all registered workspaces

git bulk -a [git-command]

Add a workspace from a directory

git bulk --addworkspace [name] [path]

Add the current directory as a workspace

git bulk --addcurrent [name]

List all registered workspaces

git bulk --listall

Run command on a specific workspace

git bulk -w [name] [git-command]

Run with confirmation prompt before each repository

git bulk -g -a [git-command]

说明

git bulk is a git-extras utility that enables executing Git commands across multiple repositories simultaneously. It manages workspaces, which are collections of repository paths that can be organized by project, team, or any logical grouping. The tool eliminates the need to manually navigate to each repository and run the same command repeatedly. Commands like status checks, branch updates, or pull operations can be performed across dozens of repositories in a single invocation. Workspaces are stored in configuration, allowing you to define repository groups once and reuse them. This is invaluable for developers managing microservices, monorepo-adjacent architectures, or multiple client projects where synchronized operations are common.

参数

-a
Run the git command on all registered workspaces and their repositories.
-w _name_
Run the git command on the specified workspace.
-g
Guarded mode: ask for confirmation before executing on each repository.
--addworkspace _name_ _path_
Register a workspace with a logical name and root directory path. All repositories under the root directory are included. Optionally use --from _url-or-file_ to clone repositories directly into the workspace.
--removeworkspace _name_
Remove the registered workspace with the given name.
--addcurrent _name_
Add the current directory as a workspace.
--purge
Remove all defined repository locations.
--listall
List all registered workspaces and their paths.

FAQ

What is the git-bulk command used for?

git bulk is a git-extras utility that enables executing Git commands across multiple repositories simultaneously. It manages workspaces, which are collections of repository paths that can be organized by project, team, or any logical grouping. The tool eliminates the need to manually navigate to each repository and run the same command repeatedly. Commands like status checks, branch updates, or pull operations can be performed across dozens of repositories in a single invocation. Workspaces are stored in configuration, allowing you to define repository groups once and reuse them. This is invaluable for developers managing microservices, monorepo-adjacent architectures, or multiple client projects where synchronized operations are common.

How do I run a basic git-bulk example?

Run `git bulk -a [git-command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -a do in git-bulk?

Run the git command on all registered workspaces and their repositories.