MultiGIT is a GIT helper for executing a subset of git commands on multiple repositories.
mgit is a GIT helper for executing a subset of git commands on multiple repositories.
Usage:
mgit [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
config Display configuration
help Help about any command
list Lists GIT reposities with their currently checked out branches in the given directory.
pull Executes git pull in all git repositories in the given directory
purge Delete local branches in all git repositories in the given directory that don't have a corresponding remote branch
Flags:
-h, --help help for mgit
Use "mgit [command] --help" for more information about a command.
Commands to manage application configuration
Usage:
mgit config [command]
Available Commands:
read Read configuration
write Write configuration values
Flags:
-h, --help help for config
Use "mgit config [command] --help" for more information about a command.
Read and display the current configuration values.
When calling without arguments, the entire configuration is displayed.
You can display a subselection of the configuration by providing the names of configuration values.
Examples:
mgit config read
mgit config read git.1.remote.name
mgit config read git.1.remote.name git.2.auth.token.token
Usage:
mgit config read [name] [flags]
Flags:
-h, --help help for read
-j, --json Print configuration as JSON.
Write one or more configuration values in the format name=value.
Examples:
mgit config write git.1.remote.name=origin
mgit config write git.2.auth.token.token=xyz
Usage:
mgit config write <name=value> [name=value ...] [flags]
Flags:
-h, --help help for write
Lists GIT reposities with their currently checked out branches in the given directory.
Usage:
mgit list [directory] [flags]
Flags:
-b, --branches List all local branches.
-h, --help help for list
Executes git pull in all git repositories in the given directory
Usage:
mgit pull [flags]
Flags:
Executes git pull in all git repositories in the given directory
Usage:
mgit pull [flags]
Flags:
-d, --default Check out the default branch (e.g. main) before pulling the latest changes.
-x, --exclude strings Exclude the repositories with the names given here from pulling.
-f, --force Force pulling or checking out the default branch when current branch is dirty.
-h, --help help for pull
$\color{red}\textsf{Careful! This will delete local untracked branches - make sure you really want that!!}$
Delete all local branches in all git repositories in the given directory that don't have a corresponding remote branch
Usage:
mgit purge [flags]
Flags:
-x, --exclude strings Exclude the repositories with the names given here from purging.
-h, --help help for purge
mgit looks for the configuration in the current directory, or under $HOME/.mgit/
the file should be called config or config.yaml
the configuration is only necessary if some kind of authentication with the GIT server is required
git:
- remote:
name: origin
host: github.com
- remote:
name: origin
host: gitlab.com
auth:
basic:
username: xyz
password: xxx
- remote:
name: custom
host: enterprise.host
auth:
token:
token: the-token-xxx