Content packages for the git runtime
git-
The installed version of git should be "recent" (circa 2023).
git-modpackhas not been tested with older installations of git.
-
Unpack the release archive
-
By convention, this archive should be unpacked in
$HOME/.local/share
-
-
Install the release
-
./git-modpack/install.sh
-
-
Validate the installation
-
git help-modpack
-
-
Create a modpack
-
git modpack-init /tmp/test-modpack
-
For more details on building modpacks, see Developing Modpacks
See the GitHub releases page
git-modpack is a framework for building distributable packages of git plugins.
Such a package built using this framework is subsequently referred to as a
"modpack". An essential feature of all modpacks is that they may
be installed into either a global or a local git context. This allows the user
to use different modpacks in different projects while also using generalized
modpacks across all projects.
-
Share git aliases (or arbitrary gitconfig) across project contributors
-
Packaging method for project-local workflow scripts
-
Develop branch-aware scripts and behaviors
git-modpack provides convenient primitives for developing plugins in bash:
-
Script templates which include a skeleton
rev-parse --parseoptsimplementation -
The packlib library, which includes:
-
functions to process gitconfig formatted files as inputs
-
functions to load additional environ context from files, arguments, gitconfig, or other sources.
-
/tmp/git-foo/install.sh
To validate the installation and view the core aliases, use the help command:
git help-foo
To add an "echo" alias:
git foo-newalias foo-echo "!echo"
The second argument (!echo) is optional, and represents the command which the
alias will be set to. For more information on alias command format, refer to the
alias.* entry in git-config(1).
Aliases which require complex logic, escape sequences, or long sequences of commands may prove difficult to maintain as values in pack config files. For such cases, modpacks include a "prog" convention which provides for executing bash scripts as aliases.
git foo-newprog foo-script
The location of the newly created script will be written to stdout.
A modpack is distributed as a simple file tree, and can thus be packaged and
distributed using any archive format or committed within a project tree. All
modpacks are installed by executing the install.sh installer, like shown in
install the modpack.
See the modpack developer reference