- CONFIGURATION AND ENVIRONMENT
- BUGS AND LIMITATIONS
- LICENSE AND COPYRIGHT
group-git - Perform operations over many git repositories at once
This documentation refers to group-git version 0.7.5.
group-git [option] (git-command) -- [args] OPTIONS: Filtering: -s --skip[=]regexp Skip any project matching this regexp -m --match[=]regexp Only process any project matching this regexp -R --remote Use any management type defined to for remote git servers. Only useful if you have a group-git.yml file defining Github, Bitbucked or Gitosis types. -t --tag[=]str Only opperate on repositories tagged with str. Tags can be specified in the config file (see --man), with a file .[tag].tag in the project directory or programatically by tagger plugin. --bw Don't colour the repository names in the output. Finding projects: -r --recurse Recurses into subdirectories to check if they contain git repositories rather than only stopping at the current level. Output: -p --page Turns on paginating out put uses $PAGER environment variable if set or 'less -Rx4SFX' if not. --no-page Turn off pagination. -S --separate Add a new line separator before each repository output (Default) --no-separate Don't show the new repository separator -d --defaults[=]section Specify a different default configuration section -q --quiet Don't show project names before running git on the directory -v --verbose Show more details Other: -L --limit[=]int Limit the total number of repos processed (useful for testing commands, --limit 0 means don't limit the default) -M --max[=]int Limit the number of symultanious threads running at once. Default 10 threads -R --max-runtime[=]seconds If a commands on a repository takes longer than this number of seconds group-git will no longer wait for it to finish (Default 600s or 10 minutes) --VERSION Prints the version information --help Prints this help information --man Prints the full documentation for group-git eg # run "git log -n 1" in each repository group-git log -- -n 1 # run "git pull" for only repositories tagged with "perl" group-git --tag perl pull # run "git grep 'where is it'" for each repository showing the repository even if nothing found group-git --verbose grep 'where is it' # run "git status" with out trying to get new repositories (configured in group-git.yml) group-git --local status
group-git allows you to run any git command over all repositories in the current directory (or sub directories if
--recurse is used). It can help with the management of many git repositories with a simple tool set.
If you have a config file set up in the current directory (group-git.yml or some other suffix group-git file supported by Config::Any) extra functionality becomes available if you use Github, Bitbucket or Gitosis as your repository remote store. The config file will be read to supply the appropriate user credentials or in the case of gitosis the admin project location.
With this extra information both the pull and the update commands will try to clone any repository that are not currently checked out in the current directory.
eg group-git.yml --- # Type may be any of Github, Bitbucket or Gitosis type: Github #type: Bitbucket #type: Gitosis # if username or password are missing they will be prompted for username: firstname.lastname@example.org password: securepass # for github you can specify an access token if using 2 factor auth #access_token: .... # Gitosis uses it's git url which needs to be defined or will be prompted for #gitosis: email@example.com:gitosis-admin.git # Global Exclude a git project #exclude: # - project_not_to_be_managed # - ... # Global Include only these projects (if mentioned only projects listed will be # processed any others found will be ignored) #include: # - project_of_interest_1 # - project_of_interest_2 # - ... # Set up tags for groups of projects so you can opperate only on that tag # Tags can also be defined with the projects directory creating a file with # a name of the format ".[tag].tag" # eg to tag a project as mytag create a file .mytag.tag #tags: # mytag: # - project1 # - project2 # myothertag: # - project2 # - project3 # Aliases of commands can be made using the aliases element in a similar # fashon to git's own aliases functionality #aliases: # log: log --oneline
For Github and Bitbucket if username or password are missing you will be prompted to enter the details.
There are several ways of defining tags that can be used:
You can define tags in the
In the individual repositories you can add a file .tag-name.tag to the root directory and it will be picked up as a tag
There are several ways this is done:
Forks are tagged as
forkand non-forks are tagged as
If you have stash repositories are tagged as the project they are in.
Automatic tagging can be done by modules in the Group::Git::Taggers::*, two are provided by default:
Repositories that are only local to your computer
Clones of remote repositories.
If paginating the
$PAGER environment variable is used if it is not set the command
'less -Rx4SFX' is used for paginating, if
$PAGER not set and less not installed no pagination will be done.
There are no known bugs in this module.
Please report problems to Ivan Wills (firstname.lastname@example.org).
Patches are welcome.
Ivan Wills - (email@example.com)
Copyright (c) 2013-2016 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.