git-bunch - manage bunch directories which contain git repositories
git-bunch -h | --help
git-bunch -l | --list
git-bunch NAME
git-bunch NAME ls
git-bunch NAME config -l | --list
git-bunch NAME config name value
git-bunch NAME config --unset name
git-bunch NAME [--] COMMAND [OPTIONS]
git-bunch or bunch is a term to refer to a directory which is supposed to be a container for other directories being containers of git repositories.
If you keep your repos under some directory...
If you need to execute (sometimes, not so often) some particular git commands over these repos...
... this script for you!
The script assumes that all bunches and their settings are stored
globally in the ~/.gitconfig
file.
You can declare more than one bunch. Each directory containing git repositories can be called a bunch. Each bunch has a name, path and options. The name is used to refer the bunch. The path is used to locate the bunch. Options are used to tune the bunch. There is no restriction to declare more than one name per a bunch. In this case both names are synonyms, but they could have different options.
Git bunch is per-user configuration only. That means that all bunches
are configured via user's ~/.gitconfig
. The syntax is almost the
same as for gitconfig
.
In this example two bunches called "one" and "two" are created and setup to particular directories:
[bunch "one"]
path = /var/git/bunch-1
stoponerror = no
[bunch "two"]
path = /var/git/bunch-2
stoponerror = no
-
pathname
A pathname follows Bash syntax. -
boolean
The following words stand for true and false:-
true
Boolean true literals areyes
,on
,true
,1
.In contrast to git itself, the single name (without
= value
) is treated as false. -
false
Boolean false literals areno
,off
,false
,0
and the emtpy string.
-
The following variables are supported for bunches:
-
path
(string)
The only mandatory variable defining the bunch location. -
stoponerror
(boolean)
True means stop immediately if a command exits with a non-zero status. Defaults to false (i.e.,set +o errexit
).
-
bash
4.4+ -
sed
-
ls
Something similar...
-
https://metacpan.org/pod/Git::Bunch
Something very similar, implemented in pure Perl. -
https://github.com/salewski/ads-github-tools
That sounds promising: The project providing command line tools for managing a large number of GitHub repositories....
Copyright (c) 2020 Ildar Shaimordanov. MIT License.