Grence

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

$ git graph install [options]

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/gitconfig for 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 diff driver configuration.

  • --skip-merge (default: false)

    Do not install the merge driver configuration.

  • --skip-difftool (default: false)

    Do not install the difftool configuration.

  • -h, --help

    Display help for the command.

Examples

Local Installation

To install the drivers on a per-repository basis, navigate to the repository root and run:

git graph install

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:

git graph install --global

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:

$ git graph install -h
 
Usage: git-graph install [options]
 
Set up the diff and merge drivers under the name "graph" in the Git config.
 
Options:
  -f, --force      Sets the "graph" diff and merge drivers, overwriting existing values. (default: false)
  -l, --local      Sets the "graph" diff and merge drivers in the local repository's git config. (default when no scope is specified) (default: false)
  -s, --system     Sets the "graph" diff and merge drivers in the system git config (e.g. /etc/gitconfig). (default: false)
  -g, --global     Sets the "graph" diff and merge drivers in the global git config (~/.gitconfig). (default: false)
  -w, --worktree   Sets the "graph" diff and merge drivers in the worktree git config. (default: false)
  --skip-diff      Skip installing the diff driver configuration. (default: false)
  --skip-merge     Skip installing the merge driver configuration. (default: false)
  --skip-difftool  Skip installing the difftool configuration. (default: false)
  -h, --help       display help for command

How is this guide?

On this page