Install
Set up git drivers for Git Graph.
The install command sets up the diff, difftool, and merge drivers under the graph name in your Git configuration. This allows Git Graph to be used both globally and on a per-repository basis without requiring a repository to be present during installation.
Usage
Description
Run the install command to set up the necessary Git drivers for Git Graph. By default, if no scope is specified, the drivers will be installed in the local repository's Git configuration. However, you can also specify other scopes (system, global, or worktree).
When you download the git-graph binary, it will automatically install the drivers for you using the --global scope.
Options
-
-f, --force(default: false)Overwrite any existing "graph" diff and merge driver configurations.
-
-l, --local(default: true)Install the drivers in the local repository's Git configuration.
-
-s, --system(default: false)Install the drivers in the system Git configuration (e.g.,
/etc/gitconfigfor Linux). -
-g, --global(default: false)Install the drivers in the global Git configuration (typically located at
~/.gitconfig). -
-w, --worktree(default: false)Install the drivers in the worktree Git configuration.
-
--skip-diff(default: false)Do not install the
diffdriver configuration. -
--skip-merge(default: false)Do not install the
mergedriver configuration. -
--skip-difftool(default: false)Do not install the difftool configuration.
-
-h, --helpDisplay help for the command.
Examples
Local Installation
To install the drivers on a per-repository basis, navigate to the repository root and run:
Since the --local scope is the default, running it outside of a Git repository will result in an error.
Global Installation
To install the drivers globally without specifying a repository, run:
When you download the git-graph binary first time, it will automatically install the drivers for you using the --global scope.
Driver Overview
Git Graph installs three different drivers:
diff: Uses Git's internal textconv to convert graph files to a human-readable LPG-JSON format.difftool: Provides a semantic comparison for graph files, allowing a deeper understanding of the changes.merge: Integrates with Git's merge mechanism to perform semantic merges of graph files.
To selectively skip installing any specific driver, use the options --skip-diff, --skip-merge, and --skip-difftool as needed.
Using all three options --skip-diff, --skip-merge, and --skip-difftool simultaneously will result in an error, as this would effectively skip all installation actions, making the command meaningless.
To overwrite existing driver configurations, use the --force flag.
Help
You can display the help for the install command by running:
How is this guide?